aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext3
diff options
context:
space:
mode:
authorDave Hansen <haveblue@us.ibm.com>2006-10-01 02:29:06 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-01 03:39:30 -0400
commitce71ec36840368b877fb63bd14c8e67ab62d08b1 (patch)
tree55ea3caaa339881dfd66d787b3dbbb964825d07a /fs/ext3
parent17ff785691503f63ec648df82a7fdaece7695561 (diff)
[PATCH] r/o bind mounts: monitor zeroing of i_nlink
Some filesystems, instead of simply decrementing i_nlink, simply zero it during an unlink operation. We need to catch these in addition to the decrement operations. Signed-off-by: Dave Hansen <haveblue@us.ibm.com> Acked-by: Christoph Hellwig <hch@lst.de> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/ext3')
-rw-r--r--fs/ext3/namei.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c
index b45c88bd5f73..906731a20f1a 100644
--- a/fs/ext3/namei.c
+++ b/fs/ext3/namei.c
@@ -2045,7 +2045,7 @@ static int ext3_rmdir (struct inode * dir, struct dentry *dentry)
2045 "empty directory has nlink!=2 (%d)", 2045 "empty directory has nlink!=2 (%d)",
2046 inode->i_nlink); 2046 inode->i_nlink);
2047 inode->i_version++; 2047 inode->i_version++;
2048 inode->i_nlink = 0; 2048 clear_nlink(inode);
2049 /* There's no need to set i_disksize: the fact that i_nlink is 2049 /* There's no need to set i_disksize: the fact that i_nlink is
2050 * zero will ensure that the right thing happens during any 2050 * zero will ensure that the right thing happens during any
2051 * recovery. */ 2051 * recovery. */