diff options
Diffstat (limited to 'fs/ext2/namei.c')
-rw-r--r-- | fs/ext2/namei.c | 8 |
1 files changed, 6 insertions, 2 deletions
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 | }; |