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@xxxxxxxxxxx> 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 > - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html