From: Hugh Dickins <hugh@veritas.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Sergey Vlasov <vsu@altlinux.ru>,
Al Viro <viro@zeniv.linux.org.uk>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: [PATCH] tmpfs: Decrement i_nlink correctly in shmem_rmdir()
Date: Mon, 12 Jun 2006 21:53:23 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0606122150400.23556@blonde.wat.veritas.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0606121957580.18760@blonde.wat.veritas.com>
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);
}
prev parent reply other threads:[~2006-06-12 21:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <11501251772137-git-send-email-vsu@altlinux.ru>
2006-06-12 19:10 ` Hugh Dickins
2006-06-12 20:53 ` Hugh Dickins [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0606122150400.23556@blonde.wat.veritas.com \
--to=hugh@veritas.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
--cc=viro@zeniv.linux.org.uk \
--cc=vsu@altlinux.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®