aboutsummaryrefslogtreecommitdiffstats
path: root/mm/shmem.c
diff options
context:
space:
mode:
authorSergey Vlasov <vsu@altlinux.ru>2006-06-12 16:53:23 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-12 17:29:04 -0400
commit86bc843a268058df558844b6bf64531617fbc698 (patch)
tree159a320d16495b1328aa6c7822ebbb79c5375da7 /mm/shmem.c
parentcfd95a9cf58cd9e92d4c23b5ee20b07a3d121477 (diff)
[PATCH] tmpfs: Decrement i_nlink correctly in shmem_rmdir()
shmem_rmdir() must undo the increment of i_nlink done in shmem_get_inode() for directories, otherwise at least IN_DELETE_SELF inotify event generation is broken. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/shmem.c')
-rw-r--r--mm/shmem.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/shmem.c b/mm/shmem.c
index 73f7a9dfcd3..1e43c8a865b 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -1780,6 +1780,7 @@ static int shmem_rmdir(struct inode *dir, struct dentry *dentry)
1780 if (!simple_empty(dentry)) 1780 if (!simple_empty(dentry))
1781 return -ENOTEMPTY; 1781 return -ENOTEMPTY;
1782 1782
1783 dentry->d_inode->i_nlink--;
1783 dir->i_nlink--; 1784 dir->i_nlink--;
1784 return shmem_unlink(dir, dentry); 1785 return shmem_unlink(dir, dentry);
1785} 1786}