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/reiserfs/namei.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/reiserfs/namei.c')
-rw-r--r-- | fs/reiserfs/namei.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c index c76d427e027b..cf92e89515f2 100644 --- a/fs/reiserfs/namei.c +++ b/fs/reiserfs/namei.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/smp_lock.h> | 19 | #include <linux/smp_lock.h> |
20 | #include <linux/quotaops.h> | 20 | #include <linux/quotaops.h> |
21 | 21 | ||
22 | #define INC_DIR_INODE_NLINK(i) if (i->i_nlink != 1) { i->i_nlink++; if (i->i_nlink >= REISERFS_LINK_MAX) i->i_nlink=1; } | 22 | #define INC_DIR_INODE_NLINK(i) if (i->i_nlink != 1) { inc_nlink(i); if (i->i_nlink >= REISERFS_LINK_MAX) i->i_nlink=1; } |
23 | #define DEC_DIR_INODE_NLINK(i) if (i->i_nlink != 1) drop_nlink(i); | 23 | #define DEC_DIR_INODE_NLINK(i) if (i->i_nlink != 1) drop_nlink(i); |
24 | 24 | ||
25 | // directory item contains array of entry headers. This performs | 25 | // directory item contains array of entry headers. This performs |
@@ -1006,7 +1006,7 @@ static int reiserfs_unlink(struct inode *dir, struct dentry *dentry) | |||
1006 | reiserfs_cut_from_item(&th, &path, &(de.de_entry_key), dir, NULL, | 1006 | reiserfs_cut_from_item(&th, &path, &(de.de_entry_key), dir, NULL, |
1007 | 0); | 1007 | 0); |
1008 | if (retval < 0) { | 1008 | if (retval < 0) { |
1009 | inode->i_nlink++; | 1009 | inc_nlink(inode); |
1010 | goto end_unlink; | 1010 | goto end_unlink; |
1011 | } | 1011 | } |
1012 | inode->i_ctime = CURRENT_TIME_SEC; | 1012 | inode->i_ctime = CURRENT_TIME_SEC; |
@@ -1143,7 +1143,7 @@ static int reiserfs_link(struct dentry *old_dentry, struct inode *dir, | |||
1143 | } | 1143 | } |
1144 | 1144 | ||
1145 | /* inc before scheduling so reiserfs_unlink knows we are here */ | 1145 | /* inc before scheduling so reiserfs_unlink knows we are here */ |
1146 | inode->i_nlink++; | 1146 | inc_nlink(inode); |
1147 | 1147 | ||
1148 | retval = journal_begin(&th, dir->i_sb, jbegin_count); | 1148 | retval = journal_begin(&th, dir->i_sb, jbegin_count); |
1149 | if (retval) { | 1149 | if (retval) { |