summaryrefslogtreecommitdiff
path: root/fs/vfat
diff options
context:
space:
mode:
authorDave Hansen <haveblue@us.ibm.com>2006-10-01 10:29:06 +0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-01 11:39:30 +0400
commitce71ec36840368b877fb63bd14c8e67ab62d08b1 (patch)
tree55ea3caaa339881dfd66d787b3dbbb964825d07a /fs/vfat
parent17ff785691503f63ec648df82a7fdaece7695561 (diff)
downloadlinux-ce71ec36840368b877fb63bd14c8e67ab62d08b1.tar.xz
[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/vfat')
-rw-r--r--fs/vfat/namei.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/vfat/namei.c b/fs/vfat/namei.c
index 5846ba2d5d9f..edb711ff7b05 100644
--- a/fs/vfat/namei.c
+++ b/fs/vfat/namei.c
@@ -784,7 +784,7 @@ static int vfat_rmdir(struct inode *dir, struct dentry *dentry)
goto out;
drop_nlink(dir);
- inode->i_nlink = 0;
+ clear_nlink(inode);
inode->i_mtime = inode->i_atime = CURRENT_TIME_SEC;
fat_detach(inode);
out:
@@ -808,7 +808,7 @@ static int vfat_unlink(struct inode *dir, struct dentry *dentry)
err = fat_remove_entries(dir, &sinfo); /* and releases bh */
if (err)
goto out;
- inode->i_nlink = 0;
+ clear_nlink(inode);
inode->i_mtime = inode->i_atime = CURRENT_TIME_SEC;
fat_detach(inode);
out: