Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * linux/fs/ext2/namei.c |
| 3 | * |
| 4 | * Rewrite to pagecache. Almost all code had been changed, so blame me |
| 5 | * if the things go wrong. Please, send bug reports to |
| 6 | * viro@parcelfarce.linux.theplanet.co.uk |
| 7 | * |
| 8 | * Stuff here is basically a glue between the VFS and generic UNIXish |
| 9 | * filesystem that keeps everything in pagecache. All knowledge of the |
| 10 | * directory layout is in fs/ext2/dir.c - it turned out to be easily separatable |
| 11 | * and it's easier to debug that way. In principle we might want to |
| 12 | * generalize that a bit and turn it into a library. Or not. |
| 13 | * |
| 14 | * The only non-static object here is ext2_dir_inode_operations. |
| 15 | * |
| 16 | * TODO: get rid of kmap() use, add readahead. |
| 17 | * |
| 18 | * Copyright (C) 1992, 1993, 1994, 1995 |
| 19 | * Remy Card (card@masi.ibp.fr) |
| 20 | * Laboratoire MASI - Institut Blaise Pascal |
| 21 | * Universite Pierre et Marie Curie (Paris VI) |
| 22 | * |
| 23 | * from |
| 24 | * |
| 25 | * linux/fs/minix/namei.c |
| 26 | * |
| 27 | * Copyright (C) 1991, 1992 Linus Torvalds |
| 28 | * |
| 29 | * Big-endian to little-endian byte-swapping/bitmaps by |
| 30 | * David S. Miller (davem@caip.rutgers.edu), 1995 |
| 31 | */ |
| 32 | |
| 33 | #include <linux/pagemap.h> |
| 34 | #include "ext2.h" |
| 35 | #include "xattr.h" |
| 36 | #include "acl.h" |
Carsten Otte | 6d79125 | 2005-06-23 22:05:26 -0700 | [diff] [blame] | 37 | #include "xip.h" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 38 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 39 | static inline int ext2_add_nondir(struct dentry *dentry, struct inode *inode) |
| 40 | { |
| 41 | int err = ext2_add_link(dentry, inode); |
| 42 | if (!err) { |
| 43 | d_instantiate(dentry, inode); |
Al Viro | 41080b5 | 2008-12-30 01:52:35 -0500 | [diff] [blame] | 44 | unlock_new_inode(inode); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 45 | return 0; |
| 46 | } |
Alexey Dobriyan | a513b03 | 2006-03-23 03:00:53 -0800 | [diff] [blame] | 47 | inode_dec_link_count(inode); |
Al Viro | 41080b5 | 2008-12-30 01:52:35 -0500 | [diff] [blame] | 48 | unlock_new_inode(inode); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 49 | iput(inode); |
| 50 | return err; |
| 51 | } |
| 52 | |
| 53 | /* |
| 54 | * Methods themselves. |
| 55 | */ |
| 56 | |
| 57 | static struct dentry *ext2_lookup(struct inode * dir, struct dentry *dentry, struct nameidata *nd) |
| 58 | { |
| 59 | struct inode * inode; |
| 60 | ino_t ino; |
| 61 | |
| 62 | if (dentry->d_name.len > EXT2_NAME_LEN) |
| 63 | return ERR_PTR(-ENAMETOOLONG); |
| 64 | |
Al Viro | a988544 | 2008-08-24 07:28:39 -0400 | [diff] [blame] | 65 | ino = ext2_inode_by_name(dir, &dentry->d_name); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 66 | inode = NULL; |
| 67 | if (ino) { |
David Howells | 52fcf70 | 2008-02-07 00:15:35 -0800 | [diff] [blame] | 68 | inode = ext2_iget(dir->i_sb, ino); |
| 69 | if (IS_ERR(inode)) |
| 70 | return ERR_CAST(inode); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 71 | } |
Pekka Enberg | 082a05c | 2006-01-14 13:21:07 -0800 | [diff] [blame] | 72 | return d_splice_alias(inode, dentry); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 73 | } |
| 74 | |
| 75 | struct dentry *ext2_get_parent(struct dentry *child) |
| 76 | { |
Al Viro | a988544 | 2008-08-24 07:28:39 -0400 | [diff] [blame] | 77 | struct qstr dotdot = {.name = "..", .len = 2}; |
| 78 | unsigned long ino = ext2_inode_by_name(child->d_inode, &dotdot); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 79 | if (!ino) |
| 80 | return ERR_PTR(-ENOENT); |
Christoph Hellwig | 4400372 | 2008-08-11 15:49:04 +0200 | [diff] [blame] | 81 | return d_obtain_alias(ext2_iget(child->d_inode->i_sb, ino)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 82 | } |
| 83 | |
| 84 | /* |
| 85 | * By the time this is called, we already have created |
| 86 | * the directory cache entry for the new file, but it |
| 87 | * is so far negative - it has no inode. |
| 88 | * |
| 89 | * If the create succeeds, we fill in the inode information |
| 90 | * with d_instantiate(). |
| 91 | */ |
| 92 | static int ext2_create (struct inode * dir, struct dentry * dentry, int mode, struct nameidata *nd) |
| 93 | { |
| 94 | struct inode * inode = ext2_new_inode (dir, mode); |
| 95 | int err = PTR_ERR(inode); |
| 96 | if (!IS_ERR(inode)) { |
| 97 | inode->i_op = &ext2_file_inode_operations; |
Carsten Otte | 6d79125 | 2005-06-23 22:05:26 -0700 | [diff] [blame] | 98 | if (ext2_use_xip(inode->i_sb)) { |
| 99 | inode->i_mapping->a_ops = &ext2_aops_xip; |
| 100 | inode->i_fop = &ext2_xip_file_operations; |
| 101 | } else if (test_opt(inode->i_sb, NOBH)) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 102 | inode->i_mapping->a_ops = &ext2_nobh_aops; |
Carsten Otte | 6d79125 | 2005-06-23 22:05:26 -0700 | [diff] [blame] | 103 | inode->i_fop = &ext2_file_operations; |
| 104 | } else { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 105 | inode->i_mapping->a_ops = &ext2_aops; |
Carsten Otte | 6d79125 | 2005-06-23 22:05:26 -0700 | [diff] [blame] | 106 | inode->i_fop = &ext2_file_operations; |
| 107 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 108 | mark_inode_dirty(inode); |
| 109 | err = ext2_add_nondir(dentry, inode); |
| 110 | } |
| 111 | return err; |
| 112 | } |
| 113 | |
| 114 | static int ext2_mknod (struct inode * dir, struct dentry *dentry, int mode, dev_t rdev) |
| 115 | { |
| 116 | struct inode * inode; |
| 117 | int err; |
| 118 | |
| 119 | if (!new_valid_dev(rdev)) |
| 120 | return -EINVAL; |
| 121 | |
| 122 | inode = ext2_new_inode (dir, mode); |
| 123 | err = PTR_ERR(inode); |
| 124 | if (!IS_ERR(inode)) { |
| 125 | init_special_inode(inode, inode->i_mode, rdev); |
| 126 | #ifdef CONFIG_EXT2_FS_XATTR |
| 127 | inode->i_op = &ext2_special_inode_operations; |
| 128 | #endif |
| 129 | mark_inode_dirty(inode); |
| 130 | err = ext2_add_nondir(dentry, inode); |
| 131 | } |
| 132 | return err; |
| 133 | } |
| 134 | |
| 135 | static int ext2_symlink (struct inode * dir, struct dentry * dentry, |
| 136 | const char * symname) |
| 137 | { |
| 138 | struct super_block * sb = dir->i_sb; |
| 139 | int err = -ENAMETOOLONG; |
| 140 | unsigned l = strlen(symname)+1; |
| 141 | struct inode * inode; |
| 142 | |
| 143 | if (l > sb->s_blocksize) |
| 144 | goto out; |
| 145 | |
| 146 | inode = ext2_new_inode (dir, S_IFLNK | S_IRWXUGO); |
| 147 | err = PTR_ERR(inode); |
| 148 | if (IS_ERR(inode)) |
| 149 | goto out; |
| 150 | |
| 151 | if (l > sizeof (EXT2_I(inode)->i_data)) { |
| 152 | /* slow symlink */ |
| 153 | inode->i_op = &ext2_symlink_inode_operations; |
| 154 | if (test_opt(inode->i_sb, NOBH)) |
| 155 | inode->i_mapping->a_ops = &ext2_nobh_aops; |
| 156 | else |
| 157 | inode->i_mapping->a_ops = &ext2_aops; |
| 158 | err = page_symlink(inode, symname, l); |
| 159 | if (err) |
| 160 | goto out_fail; |
| 161 | } else { |
| 162 | /* fast symlink */ |
| 163 | inode->i_op = &ext2_fast_symlink_inode_operations; |
| 164 | memcpy((char*)(EXT2_I(inode)->i_data),symname,l); |
| 165 | inode->i_size = l-1; |
| 166 | } |
| 167 | mark_inode_dirty(inode); |
| 168 | |
| 169 | err = ext2_add_nondir(dentry, inode); |
| 170 | out: |
| 171 | return err; |
| 172 | |
| 173 | out_fail: |
Alexey Dobriyan | a513b03 | 2006-03-23 03:00:53 -0800 | [diff] [blame] | 174 | inode_dec_link_count(inode); |
Al Viro | 41080b5 | 2008-12-30 01:52:35 -0500 | [diff] [blame] | 175 | unlock_new_inode(inode); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 176 | iput (inode); |
| 177 | goto out; |
| 178 | } |
| 179 | |
| 180 | static int ext2_link (struct dentry * old_dentry, struct inode * dir, |
| 181 | struct dentry *dentry) |
| 182 | { |
| 183 | struct inode *inode = old_dentry->d_inode; |
Al Viro | 41080b5 | 2008-12-30 01:52:35 -0500 | [diff] [blame] | 184 | int err; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 185 | |
| 186 | if (inode->i_nlink >= EXT2_LINK_MAX) |
| 187 | return -EMLINK; |
| 188 | |
| 189 | inode->i_ctime = CURRENT_TIME_SEC; |
Alexey Dobriyan | a513b03 | 2006-03-23 03:00:53 -0800 | [diff] [blame] | 190 | inode_inc_link_count(inode); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 191 | atomic_inc(&inode->i_count); |
| 192 | |
Al Viro | 41080b5 | 2008-12-30 01:52:35 -0500 | [diff] [blame] | 193 | err = ext2_add_link(dentry, inode); |
| 194 | if (!err) { |
| 195 | d_instantiate(dentry, inode); |
| 196 | return 0; |
| 197 | } |
| 198 | inode_dec_link_count(inode); |
| 199 | iput(inode); |
| 200 | return err; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 201 | } |
| 202 | |
| 203 | static int ext2_mkdir(struct inode * dir, struct dentry * dentry, int mode) |
| 204 | { |
| 205 | struct inode * inode; |
| 206 | int err = -EMLINK; |
| 207 | |
| 208 | if (dir->i_nlink >= EXT2_LINK_MAX) |
| 209 | goto out; |
| 210 | |
Alexey Dobriyan | a513b03 | 2006-03-23 03:00:53 -0800 | [diff] [blame] | 211 | inode_inc_link_count(dir); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 212 | |
| 213 | inode = ext2_new_inode (dir, S_IFDIR | mode); |
| 214 | err = PTR_ERR(inode); |
| 215 | if (IS_ERR(inode)) |
| 216 | goto out_dir; |
| 217 | |
| 218 | inode->i_op = &ext2_dir_inode_operations; |
| 219 | inode->i_fop = &ext2_dir_operations; |
| 220 | if (test_opt(inode->i_sb, NOBH)) |
| 221 | inode->i_mapping->a_ops = &ext2_nobh_aops; |
| 222 | else |
| 223 | inode->i_mapping->a_ops = &ext2_aops; |
| 224 | |
Alexey Dobriyan | a513b03 | 2006-03-23 03:00:53 -0800 | [diff] [blame] | 225 | inode_inc_link_count(inode); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 226 | |
| 227 | err = ext2_make_empty(inode, dir); |
| 228 | if (err) |
| 229 | goto out_fail; |
| 230 | |
| 231 | err = ext2_add_link(dentry, inode); |
| 232 | if (err) |
| 233 | goto out_fail; |
| 234 | |
| 235 | d_instantiate(dentry, inode); |
Al Viro | 41080b5 | 2008-12-30 01:52:35 -0500 | [diff] [blame] | 236 | unlock_new_inode(inode); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 237 | out: |
| 238 | return err; |
| 239 | |
| 240 | out_fail: |
Alexey Dobriyan | a513b03 | 2006-03-23 03:00:53 -0800 | [diff] [blame] | 241 | inode_dec_link_count(inode); |
| 242 | inode_dec_link_count(inode); |
Al Viro | 41080b5 | 2008-12-30 01:52:35 -0500 | [diff] [blame] | 243 | unlock_new_inode(inode); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 244 | iput(inode); |
| 245 | out_dir: |
Alexey Dobriyan | a513b03 | 2006-03-23 03:00:53 -0800 | [diff] [blame] | 246 | inode_dec_link_count(dir); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 247 | goto out; |
| 248 | } |
| 249 | |
| 250 | static int ext2_unlink(struct inode * dir, struct dentry *dentry) |
| 251 | { |
| 252 | struct inode * inode = dentry->d_inode; |
| 253 | struct ext2_dir_entry_2 * de; |
| 254 | struct page * page; |
| 255 | int err = -ENOENT; |
| 256 | |
Al Viro | a988544 | 2008-08-24 07:28:39 -0400 | [diff] [blame] | 257 | de = ext2_find_entry (dir, &dentry->d_name, &page); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 258 | if (!de) |
| 259 | goto out; |
| 260 | |
| 261 | err = ext2_delete_entry (de, page); |
| 262 | if (err) |
| 263 | goto out; |
| 264 | |
| 265 | inode->i_ctime = dir->i_ctime; |
Alexey Dobriyan | a513b03 | 2006-03-23 03:00:53 -0800 | [diff] [blame] | 266 | inode_dec_link_count(inode); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 267 | err = 0; |
| 268 | out: |
| 269 | return err; |
| 270 | } |
| 271 | |
| 272 | static int ext2_rmdir (struct inode * dir, struct dentry *dentry) |
| 273 | { |
| 274 | struct inode * inode = dentry->d_inode; |
| 275 | int err = -ENOTEMPTY; |
| 276 | |
| 277 | if (ext2_empty_dir(inode)) { |
| 278 | err = ext2_unlink(dir, dentry); |
| 279 | if (!err) { |
| 280 | inode->i_size = 0; |
Alexey Dobriyan | a513b03 | 2006-03-23 03:00:53 -0800 | [diff] [blame] | 281 | inode_dec_link_count(inode); |
| 282 | inode_dec_link_count(dir); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 283 | } |
| 284 | } |
| 285 | return err; |
| 286 | } |
| 287 | |
| 288 | static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry, |
| 289 | struct inode * new_dir, struct dentry * new_dentry ) |
| 290 | { |
| 291 | struct inode * old_inode = old_dentry->d_inode; |
| 292 | struct inode * new_inode = new_dentry->d_inode; |
| 293 | struct page * dir_page = NULL; |
| 294 | struct ext2_dir_entry_2 * dir_de = NULL; |
| 295 | struct page * old_page; |
| 296 | struct ext2_dir_entry_2 * old_de; |
| 297 | int err = -ENOENT; |
| 298 | |
Al Viro | a988544 | 2008-08-24 07:28:39 -0400 | [diff] [blame] | 299 | old_de = ext2_find_entry (old_dir, &old_dentry->d_name, &old_page); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 300 | if (!old_de) |
| 301 | goto out; |
| 302 | |
| 303 | if (S_ISDIR(old_inode->i_mode)) { |
| 304 | err = -EIO; |
| 305 | dir_de = ext2_dotdot(old_inode, &dir_page); |
| 306 | if (!dir_de) |
| 307 | goto out_old; |
| 308 | } |
| 309 | |
| 310 | if (new_inode) { |
| 311 | struct page *new_page; |
| 312 | struct ext2_dir_entry_2 *new_de; |
| 313 | |
| 314 | err = -ENOTEMPTY; |
| 315 | if (dir_de && !ext2_empty_dir (new_inode)) |
| 316 | goto out_dir; |
| 317 | |
| 318 | err = -ENOENT; |
Al Viro | a988544 | 2008-08-24 07:28:39 -0400 | [diff] [blame] | 319 | new_de = ext2_find_entry (new_dir, &new_dentry->d_name, &new_page); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 320 | if (!new_de) |
| 321 | goto out_dir; |
Alexey Dobriyan | a513b03 | 2006-03-23 03:00:53 -0800 | [diff] [blame] | 322 | inode_inc_link_count(old_inode); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 323 | ext2_set_link(new_dir, new_de, new_page, old_inode); |
| 324 | new_inode->i_ctime = CURRENT_TIME_SEC; |
| 325 | if (dir_de) |
Dave Hansen | 9a53c3a | 2006-09-30 23:29:03 -0700 | [diff] [blame] | 326 | drop_nlink(new_inode); |
Alexey Dobriyan | a513b03 | 2006-03-23 03:00:53 -0800 | [diff] [blame] | 327 | inode_dec_link_count(new_inode); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 328 | } else { |
| 329 | if (dir_de) { |
| 330 | err = -EMLINK; |
| 331 | if (new_dir->i_nlink >= EXT2_LINK_MAX) |
| 332 | goto out_dir; |
| 333 | } |
Alexey Dobriyan | a513b03 | 2006-03-23 03:00:53 -0800 | [diff] [blame] | 334 | inode_inc_link_count(old_inode); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 335 | err = ext2_add_link(new_dentry, old_inode); |
| 336 | if (err) { |
Alexey Dobriyan | a513b03 | 2006-03-23 03:00:53 -0800 | [diff] [blame] | 337 | inode_dec_link_count(old_inode); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 338 | goto out_dir; |
| 339 | } |
| 340 | if (dir_de) |
Alexey Dobriyan | a513b03 | 2006-03-23 03:00:53 -0800 | [diff] [blame] | 341 | inode_inc_link_count(new_dir); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 342 | } |
| 343 | |
| 344 | /* |
| 345 | * Like most other Unix systems, set the ctime for inodes on a |
| 346 | * rename. |
Alexey Dobriyan | a513b03 | 2006-03-23 03:00:53 -0800 | [diff] [blame] | 347 | * inode_dec_link_count() will mark the inode dirty. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 348 | */ |
| 349 | old_inode->i_ctime = CURRENT_TIME_SEC; |
| 350 | |
| 351 | ext2_delete_entry (old_de, old_page); |
Alexey Dobriyan | a513b03 | 2006-03-23 03:00:53 -0800 | [diff] [blame] | 352 | inode_dec_link_count(old_inode); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 353 | |
| 354 | if (dir_de) { |
| 355 | ext2_set_link(old_inode, dir_de, dir_page, new_dir); |
Alexey Dobriyan | a513b03 | 2006-03-23 03:00:53 -0800 | [diff] [blame] | 356 | inode_dec_link_count(old_dir); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 357 | } |
| 358 | return 0; |
| 359 | |
| 360 | |
| 361 | out_dir: |
| 362 | if (dir_de) { |
| 363 | kunmap(dir_page); |
| 364 | page_cache_release(dir_page); |
| 365 | } |
| 366 | out_old: |
| 367 | kunmap(old_page); |
| 368 | page_cache_release(old_page); |
| 369 | out: |
| 370 | return err; |
| 371 | } |
| 372 | |
Arjan van de Ven | 754661f | 2007-02-12 00:55:38 -0800 | [diff] [blame] | 373 | const struct inode_operations ext2_dir_inode_operations = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 374 | .create = ext2_create, |
| 375 | .lookup = ext2_lookup, |
| 376 | .link = ext2_link, |
| 377 | .unlink = ext2_unlink, |
| 378 | .symlink = ext2_symlink, |
| 379 | .mkdir = ext2_mkdir, |
| 380 | .rmdir = ext2_rmdir, |
| 381 | .mknod = ext2_mknod, |
| 382 | .rename = ext2_rename, |
| 383 | #ifdef CONFIG_EXT2_FS_XATTR |
| 384 | .setxattr = generic_setxattr, |
| 385 | .getxattr = generic_getxattr, |
| 386 | .listxattr = ext2_listxattr, |
| 387 | .removexattr = generic_removexattr, |
| 388 | #endif |
| 389 | .setattr = ext2_setattr, |
| 390 | .permission = ext2_permission, |
| 391 | }; |
| 392 | |
Arjan van de Ven | 754661f | 2007-02-12 00:55:38 -0800 | [diff] [blame] | 393 | const struct inode_operations ext2_special_inode_operations = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 394 | #ifdef CONFIG_EXT2_FS_XATTR |
| 395 | .setxattr = generic_setxattr, |
| 396 | .getxattr = generic_getxattr, |
| 397 | .listxattr = ext2_listxattr, |
| 398 | .removexattr = generic_removexattr, |
| 399 | #endif |
| 400 | .setattr = ext2_setattr, |
| 401 | .permission = ext2_permission, |
| 402 | }; |