aboutsummaryrefslogtreecommitdiffstats
path: root/fs/vfat/namei.c
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/vfat/namei.c
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/vfat/namei.c')
-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)
784 goto out; 784 goto out;
785 drop_nlink(dir); 785 drop_nlink(dir);
786 786
787 inode->i_nlink = 0; 787 clear_nlink(inode);
788 inode->i_mtime = inode->i_atime = CURRENT_TIME_SEC; 788 inode->i_mtime = inode->i_atime = CURRENT_TIME_SEC;
789 fat_detach(inode); 789 fat_detach(inode);
790out: 790out:
@@ -808,7 +808,7 @@ static int vfat_unlink(struct inode *dir, struct dentry *dentry)
808 err = fat_remove_entries(dir, &sinfo); /* and releases bh */ 808 err = fat_remove_entries(dir, &sinfo); /* and releases bh */
809 if (err) 809 if (err)
810 goto out; 810 goto out;
811 inode->i_nlink = 0; 811 clear_nlink(inode);
812 inode->i_mtime = inode->i_atime = CURRENT_TIME_SEC; 812 inode->i_mtime = inode->i_atime = CURRENT_TIME_SEC;
813 fat_detach(inode); 813 fat_detach(inode);
814out: 814out: