diff options
author | Dave Hansen <haveblue@us.ibm.com> | 2006-10-01 02:29:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-01 03:39:30 -0400 |
commit | d8c76e6f45c111c32a4b3e50a2adc9210737b0d8 (patch) | |
tree | 25521b59d48c6d8c9aec1af54dbe5008ad4b215b /fs/ocfs2/dlm/dlmfs.c | |
parent | 9a53c3a783c2fa9b969628e65695c11c3e51e673 (diff) |
[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/ocfs2/dlm/dlmfs.c')
-rw-r--r-- | fs/ocfs2/dlm/dlmfs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ocfs2/dlm/dlmfs.c b/fs/ocfs2/dlm/dlmfs.c index 0368c6402182..16b8d1ba7066 100644 --- a/fs/ocfs2/dlm/dlmfs.c +++ b/fs/ocfs2/dlm/dlmfs.c | |||
@@ -338,7 +338,7 @@ static struct inode *dlmfs_get_root_inode(struct super_block *sb) | |||
338 | inode->i_blocks = 0; | 338 | inode->i_blocks = 0; |
339 | inode->i_mapping->backing_dev_info = &dlmfs_backing_dev_info; | 339 | inode->i_mapping->backing_dev_info = &dlmfs_backing_dev_info; |
340 | inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; | 340 | inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; |
341 | inode->i_nlink++; | 341 | inc_nlink(inode); |
342 | 342 | ||
343 | inode->i_fop = &simple_dir_operations; | 343 | inode->i_fop = &simple_dir_operations; |
344 | inode->i_op = &dlmfs_root_inode_operations; | 344 | inode->i_op = &dlmfs_root_inode_operations; |
@@ -395,7 +395,7 @@ static struct inode *dlmfs_get_inode(struct inode *parent, | |||
395 | 395 | ||
396 | /* directory inodes start off with i_nlink == | 396 | /* directory inodes start off with i_nlink == |
397 | * 2 (for "." entry) */ | 397 | * 2 (for "." entry) */ |
398 | inode->i_nlink++; | 398 | inc_nlink(inode); |
399 | break; | 399 | break; |
400 | } | 400 | } |
401 | 401 | ||
@@ -449,7 +449,7 @@ static int dlmfs_mkdir(struct inode * dir, | |||
449 | } | 449 | } |
450 | ip->ip_dlm = dlm; | 450 | ip->ip_dlm = dlm; |
451 | 451 | ||
452 | dir->i_nlink++; | 452 | inc_nlink(dir); |
453 | d_instantiate(dentry, inode); | 453 | d_instantiate(dentry, inode); |
454 | dget(dentry); /* Extra count - pin the dentry in core */ | 454 | dget(dentry); /* Extra count - pin the dentry in core */ |
455 | 455 | ||