aboutsummaryrefslogtreecommitdiffstats
path: root/fs/msdos/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/msdos/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/msdos/namei.c')
-rw-r--r--fs/msdos/namei.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/msdos/namei.c b/fs/msdos/namei.c
index fa868c755907..b0f01b3b0536 100644
--- a/fs/msdos/namei.c
+++ b/fs/msdos/namei.c
@@ -345,7 +345,7 @@ static int msdos_rmdir(struct inode *dir, struct dentry *dentry)
345 goto out; 345 goto out;
346 drop_nlink(dir); 346 drop_nlink(dir);
347 347
348 inode->i_nlink = 0; 348 clear_nlink(inode);
349 inode->i_ctime = CURRENT_TIME_SEC; 349 inode->i_ctime = CURRENT_TIME_SEC;
350 fat_detach(inode); 350 fat_detach(inode);
351out: 351out:
@@ -430,7 +430,7 @@ static int msdos_unlink(struct inode *dir, struct dentry *dentry)
430 err = fat_remove_entries(dir, &sinfo); /* and releases bh */ 430 err = fat_remove_entries(dir, &sinfo); /* and releases bh */
431 if (err) 431 if (err)
432 goto out; 432 goto out;
433 inode->i_nlink = 0; 433 clear_nlink(inode);
434 inode->i_ctime = CURRENT_TIME_SEC; 434 inode->i_ctime = CURRENT_TIME_SEC;
435 fat_detach(inode); 435 fat_detach(inode);
436out: 436out: