summaryrefslogtreecommitdiffstats
path: root/fs/hpfs
diff options
context:
space:
mode:
authorDave Hansen2006-10-01 08:29:04 +0200
committerLinus Torvalds2006-10-01 09:39:30 +0200
commitd8c76e6f45c111c32a4b3e50a2adc9210737b0d8 (patch)
tree25521b59d48c6d8c9aec1af54dbe5008ad4b215b /fs/hpfs
parent[PATCH] r/o bind mounts: unlink: monitor i_nlink (diff)
downloadkernel-qcow2-linux-d8c76e6f45c111c32a4b3e50a2adc9210737b0d8.tar.gz
kernel-qcow2-linux-d8c76e6f45c111c32a4b3e50a2adc9210737b0d8.tar.xz
kernel-qcow2-linux-d8c76e6f45c111c32a4b3e50a2adc9210737b0d8.zip
[PATCH] r/o bind mount prepwork: inc_nlink() helper
This is mostly included for parity with dec_nlink(), where we will have some more hooks. This one should stay pretty darn straightforward for now. 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/hpfs')
-rw-r--r--fs/hpfs/namei.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/hpfs/namei.c b/fs/hpfs/namei.c
index 4078b0becc5e..25dd6f81eca7 100644
--- a/fs/hpfs/namei.c
+++ b/fs/hpfs/namei.c
@@ -89,7 +89,7 @@ static int hpfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
brelse(bh);
hpfs_mark_4buffers_dirty(&qbh0);
hpfs_brelse4(&qbh0);
- dir->i_nlink++;
+ inc_nlink(dir);
insert_inode_hash(result);
if (result->i_uid != current->fsuid ||
@@ -635,7 +635,7 @@ static int hpfs_rename(struct inode *old_dir, struct dentry *old_dentry,
end:
hpfs_i(i)->i_parent_dir = new_dir->i_ino;
if (S_ISDIR(i->i_mode)) {
- new_dir->i_nlink++;
+ inc_nlink(new_dir);
drop_nlink(old_dir);
}
if ((fnode = hpfs_map_fnode(i->i_sb, i->i_ino, &bh))) {