aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorDave Hansen <haveblue@us.ibm.com>2006-10-01 02:29:04 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-01 03:39:30 -0400
commitd8c76e6f45c111c32a4b3e50a2adc9210737b0d8 (patch)
tree25521b59d48c6d8c9aec1af54dbe5008ad4b215b /kernel
parent9a53c3a783c2fa9b969628e65695c11c3e51e673 (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 'kernel')
-rw-r--r--kernel/cpuset.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 8c3c400cce91..9d850ae13b1b 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -377,7 +377,7 @@ static int cpuset_fill_super(struct super_block *sb, void *unused_data,
377 inode->i_op = &simple_dir_inode_operations; 377 inode->i_op = &simple_dir_inode_operations;
378 inode->i_fop = &simple_dir_operations; 378 inode->i_fop = &simple_dir_operations;
379 /* directories start off with i_nlink == 2 (for "." entry) */ 379 /* directories start off with i_nlink == 2 (for "." entry) */
380 inode->i_nlink++; 380 inc_nlink(inode);
381 } else { 381 } else {
382 return -ENOMEM; 382 return -ENOMEM;
383 } 383 }
@@ -1565,7 +1565,7 @@ static int cpuset_create_file(struct dentry *dentry, int mode)
1565 inode->i_fop = &simple_dir_operations; 1565 inode->i_fop = &simple_dir_operations;
1566 1566
1567 /* start off with i_nlink == 2 (for "." entry) */ 1567 /* start off with i_nlink == 2 (for "." entry) */
1568 inode->i_nlink++; 1568 inc_nlink(inode);
1569 } else if (S_ISREG(mode)) { 1569 } else if (S_ISREG(mode)) {
1570 inode->i_size = 0; 1570 inode->i_size = 0;
1571 inode->i_fop = &cpuset_file_operations; 1571 inode->i_fop = &cpuset_file_operations;
@@ -1598,7 +1598,7 @@ static int cpuset_create_dir(struct cpuset *cs, const char *name, int mode)
1598 error = cpuset_create_file(dentry, S_IFDIR | mode); 1598 error = cpuset_create_file(dentry, S_IFDIR | mode);
1599 if (!error) { 1599 if (!error) {
1600 dentry->d_fsdata = cs; 1600 dentry->d_fsdata = cs;
1601 parent->d_inode->i_nlink++; 1601 inc_nlink(parent->d_inode);
1602 cs->dentry = dentry; 1602 cs->dentry = dentry;
1603 } 1603 }
1604 dput(dentry); 1604 dput(dentry);
@@ -2033,7 +2033,7 @@ int __init cpuset_init(void)
2033 } 2033 }
2034 root = cpuset_mount->mnt_sb->s_root; 2034 root = cpuset_mount->mnt_sb->s_root;
2035 root->d_fsdata = &top_cpuset; 2035 root->d_fsdata = &top_cpuset;
2036 root->d_inode->i_nlink++; 2036 inc_nlink(root->d_inode);
2037 top_cpuset.dentry = root; 2037 top_cpuset.dentry = root;
2038 root->d_inode->i_op = &cpuset_dir_inode_operations; 2038 root->d_inode->i_op = &cpuset_dir_inode_operations;
2039 number_of_cpusets = 1; 2039 number_of_cpusets = 1;