diff options
Diffstat (limited to 'fs/ext2')
| -rw-r--r-- | fs/ext2/acl.c | 8 | ||||
| -rw-r--r-- | fs/ext2/acl.h | 4 | ||||
| -rw-r--r-- | fs/ext2/file.c | 2 | ||||
| -rw-r--r-- | fs/ext2/namei.c | 8 |
4 files changed, 10 insertions, 12 deletions
diff --git a/fs/ext2/acl.c b/fs/ext2/acl.c index d636e1297cad..a63d44256a70 100644 --- a/fs/ext2/acl.c +++ b/fs/ext2/acl.c | |||
| @@ -230,7 +230,7 @@ ext2_set_acl(struct inode *inode, int type, struct posix_acl *acl) | |||
| 230 | return error; | 230 | return error; |
| 231 | } | 231 | } |
| 232 | 232 | ||
| 233 | static int | 233 | int |
| 234 | ext2_check_acl(struct inode *inode, int mask) | 234 | ext2_check_acl(struct inode *inode, int mask) |
| 235 | { | 235 | { |
| 236 | struct posix_acl *acl = ext2_get_acl(inode, ACL_TYPE_ACCESS); | 236 | struct posix_acl *acl = ext2_get_acl(inode, ACL_TYPE_ACCESS); |
| @@ -246,12 +246,6 @@ ext2_check_acl(struct inode *inode, int mask) | |||
| 246 | return -EAGAIN; | 246 | return -EAGAIN; |
| 247 | } | 247 | } |
| 248 | 248 | ||
| 249 | int | ||
| 250 | ext2_permission(struct inode *inode, int mask) | ||
| 251 | { | ||
| 252 | return generic_permission(inode, mask, ext2_check_acl); | ||
| 253 | } | ||
| 254 | |||
| 255 | /* | 249 | /* |
| 256 | * Initialize the ACLs of a new inode. Called from ext2_new_inode. | 250 | * Initialize the ACLs of a new inode. Called from ext2_new_inode. |
| 257 | * | 251 | * |
diff --git a/fs/ext2/acl.h b/fs/ext2/acl.h index ecefe478898f..3ff6cbb9ac44 100644 --- a/fs/ext2/acl.h +++ b/fs/ext2/acl.h | |||
| @@ -54,13 +54,13 @@ static inline int ext2_acl_count(size_t size) | |||
| 54 | #ifdef CONFIG_EXT2_FS_POSIX_ACL | 54 | #ifdef CONFIG_EXT2_FS_POSIX_ACL |
| 55 | 55 | ||
| 56 | /* acl.c */ | 56 | /* acl.c */ |
| 57 | extern int ext2_permission (struct inode *, int); | 57 | extern int ext2_check_acl (struct inode *, int); |
| 58 | extern int ext2_acl_chmod (struct inode *); | 58 | extern int ext2_acl_chmod (struct inode *); |
| 59 | extern int ext2_init_acl (struct inode *, struct inode *); | 59 | extern int ext2_init_acl (struct inode *, struct inode *); |
| 60 | 60 | ||
| 61 | #else | 61 | #else |
| 62 | #include <linux/sched.h> | 62 | #include <linux/sched.h> |
| 63 | #define ext2_permission NULL | 63 | #define ext2_check_acl NULL |
| 64 | #define ext2_get_acl NULL | 64 | #define ext2_get_acl NULL |
| 65 | #define ext2_set_acl NULL | 65 | #define ext2_set_acl NULL |
| 66 | 66 | ||
diff --git a/fs/ext2/file.c b/fs/ext2/file.c index 2b9e47dc9222..a2f3afd1a1c1 100644 --- a/fs/ext2/file.c +++ b/fs/ext2/file.c | |||
| @@ -85,6 +85,6 @@ const struct inode_operations ext2_file_inode_operations = { | |||
| 85 | .removexattr = generic_removexattr, | 85 | .removexattr = generic_removexattr, |
| 86 | #endif | 86 | #endif |
| 87 | .setattr = ext2_setattr, | 87 | .setattr = ext2_setattr, |
| 88 | .permission = ext2_permission, | 88 | .check_acl = ext2_check_acl, |
| 89 | .fiemap = ext2_fiemap, | 89 | .fiemap = ext2_fiemap, |
| 90 | }; | 90 | }; |
diff --git a/fs/ext2/namei.c b/fs/ext2/namei.c index e1dedb0f7873..23701f289e98 100644 --- a/fs/ext2/namei.c +++ b/fs/ext2/namei.c | |||
| @@ -362,6 +362,10 @@ static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry, | |||
| 362 | if (dir_de) { | 362 | if (dir_de) { |
| 363 | if (old_dir != new_dir) | 363 | if (old_dir != new_dir) |
| 364 | ext2_set_link(old_inode, dir_de, dir_page, new_dir, 0); | 364 | ext2_set_link(old_inode, dir_de, dir_page, new_dir, 0); |
| 365 | else { | ||
| 366 | kunmap(dir_page); | ||
| 367 | page_cache_release(dir_page); | ||
| 368 | } | ||
| 365 | inode_dec_link_count(old_dir); | 369 | inode_dec_link_count(old_dir); |
| 366 | } | 370 | } |
| 367 | return 0; | 371 | return 0; |
| @@ -396,7 +400,7 @@ const struct inode_operations ext2_dir_inode_operations = { | |||
| 396 | .removexattr = generic_removexattr, | 400 | .removexattr = generic_removexattr, |
| 397 | #endif | 401 | #endif |
| 398 | .setattr = ext2_setattr, | 402 | .setattr = ext2_setattr, |
| 399 | .permission = ext2_permission, | 403 | .check_acl = ext2_check_acl, |
| 400 | }; | 404 | }; |
| 401 | 405 | ||
| 402 | const struct inode_operations ext2_special_inode_operations = { | 406 | const struct inode_operations ext2_special_inode_operations = { |
| @@ -407,5 +411,5 @@ const struct inode_operations ext2_special_inode_operations = { | |||
| 407 | .removexattr = generic_removexattr, | 411 | .removexattr = generic_removexattr, |
| 408 | #endif | 412 | #endif |
| 409 | .setattr = ext2_setattr, | 413 | .setattr = ext2_setattr, |
| 410 | .permission = ext2_permission, | 414 | .check_acl = ext2_check_acl, |
| 411 | }; | 415 | }; |
