diff options
Diffstat (limited to 'mm/shmem.c')
-rw-r--r-- | mm/shmem.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mm/shmem.c b/mm/shmem.c index b96de69f236b..908dd947b1ea 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
@@ -1772,7 +1772,7 @@ static int shmem_unlink(struct inode *dir, struct dentry *dentry) | |||
1772 | 1772 | ||
1773 | dir->i_size -= BOGO_DIRENT_SIZE; | 1773 | dir->i_size -= BOGO_DIRENT_SIZE; |
1774 | inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME; | 1774 | inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME; |
1775 | inode->i_nlink--; | 1775 | drop_nlink(inode); |
1776 | dput(dentry); /* Undo the count from "create" - this does all the work */ | 1776 | dput(dentry); /* Undo the count from "create" - this does all the work */ |
1777 | return 0; | 1777 | return 0; |
1778 | } | 1778 | } |
@@ -1782,8 +1782,8 @@ static int shmem_rmdir(struct inode *dir, struct dentry *dentry) | |||
1782 | if (!simple_empty(dentry)) | 1782 | if (!simple_empty(dentry)) |
1783 | return -ENOTEMPTY; | 1783 | return -ENOTEMPTY; |
1784 | 1784 | ||
1785 | dentry->d_inode->i_nlink--; | 1785 | drop_nlink(dentry->d_inode); |
1786 | dir->i_nlink--; | 1786 | drop_nlink(dir); |
1787 | return shmem_unlink(dir, dentry); | 1787 | return shmem_unlink(dir, dentry); |
1788 | } | 1788 | } |
1789 | 1789 | ||
@@ -1804,9 +1804,9 @@ static int shmem_rename(struct inode *old_dir, struct dentry *old_dentry, struct | |||
1804 | if (new_dentry->d_inode) { | 1804 | if (new_dentry->d_inode) { |
1805 | (void) shmem_unlink(new_dir, new_dentry); | 1805 | (void) shmem_unlink(new_dir, new_dentry); |
1806 | if (they_are_dirs) | 1806 | if (they_are_dirs) |
1807 | old_dir->i_nlink--; | 1807 | drop_nlink(old_dir); |
1808 | } else if (they_are_dirs) { | 1808 | } else if (they_are_dirs) { |
1809 | old_dir->i_nlink--; | 1809 | drop_nlink(old_dir); |
1810 | new_dir->i_nlink++; | 1810 | new_dir->i_nlink++; |
1811 | } | 1811 | } |
1812 | 1812 | ||