* Re: [PATCH] tmpfs: Decrement i_nlink correctly in shmem_rmdir() [not found] <11501251772137-git-send-email-vsu@altlinux.ru> @ 2006-06-12 19:10 ` Hugh Dickins 2006-06-12 20:53 ` Hugh Dickins 0 siblings, 1 reply; 2+ messages in thread From: Hugh Dickins @ 2006-06-12 19:10 UTC (permalink / raw) To: Sergey Vlasov; +Cc: Al Viro, linux-kernel, linux-fsdevel On 12 June 2006, Sergey Vlasov wrote: > 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> Thanks: that is consistent with ramfs, seems correct and does no harm. Though I don't think it affects anything than the fsnotify_inoderemove i_nlink test in dentry_iput. I'm a little surprised by that test, unqualified to say whether that's the right place and way to make an inoderemove test; but even if it were not, I'd be silly to reject your fix. Thanks, I'll sign it off and send it onwards. Hugh > --- > mm/shmem.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/mm/shmem.c b/mm/shmem.c > index 4c5e68e..bd7bf49 100644 > --- a/mm/shmem.c > +++ b/mm/shmem.c > @@ -1780,6 +1780,7 @@ static int shmem_rmdir(struct inode *dir > if (!simple_empty(dentry)) > return -ENOTEMPTY; > > + dentry->d_inode->i_nlink--; > dir->i_nlink--; > return shmem_unlink(dir, dentry); > } > -- > 1.4.0.g1658 > ^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] tmpfs: Decrement i_nlink correctly in shmem_rmdir() 2006-06-12 19:10 ` [PATCH] tmpfs: Decrement i_nlink correctly in shmem_rmdir() Hugh Dickins @ 2006-06-12 20:53 ` Hugh Dickins 0 siblings, 0 replies; 2+ messages in thread From: Hugh Dickins @ 2006-06-12 20:53 UTC (permalink / raw) To: Linus Torvalds; +Cc: Sergey Vlasov, Al Viro, linux-kernel, linux-fsdevel From: Sergey Vlasov <vsu@altlinux.ru> 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> --- This can also be included in 2.6.17, though only inotify depends on it. mm/shmem.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) --- 2.6.17-rc6-git/mm/shmem.c +++ linux/mm/shmem.c @@ -1780,6 +1780,7 @@ static int shmem_rmdir(struct inode *dir if (!simple_empty(dentry)) return -ENOTEMPTY; + dentry->d_inode->i_nlink--; dir->i_nlink--; return shmem_unlink(dir, dentry); } ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-06-12 21:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <11501251772137-git-send-email-vsu@altlinux.ru>
2006-06-12 19:10 ` [PATCH] tmpfs: Decrement i_nlink correctly in shmem_rmdir() Hugh Dickins
2006-06-12 20:53 ` Hugh Dickins
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®