aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-10-23 11:11:40 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2010-10-25 21:26:11 -0400
commit7de9c6ee3ecffd99e1628e81a5ea5468f7581a1f (patch)
tree88787e77ba8a253d0a26aeda4bd5e58532d592e0 /fs/xfs
parent646ec4615cd05972581c9c5342ed7a1e77df17bb (diff)
new helper: ihold()
Clones an existing reference to inode; caller must already hold one. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/linux-2.6/xfs_iops.c2
-rw-r--r--fs/xfs/xfs_inode.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c
index 71d83c93621c..96107efc0c61 100644
--- a/fs/xfs/linux-2.6/xfs_iops.c
+++ b/fs/xfs/linux-2.6/xfs_iops.c
@@ -317,7 +317,7 @@ xfs_vn_link(
317 if (unlikely(error)) 317 if (unlikely(error))
318 return -error; 318 return -error;
319 319
320 atomic_inc(&inode->i_count); 320 ihold(inode);
321 d_instantiate(dentry, inode); 321 d_instantiate(dentry, inode);
322 return 0; 322 return 0;
323} 323}
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h
index fac52290de90..fb2ca2e4cdc9 100644
--- a/fs/xfs/xfs_inode.h
+++ b/fs/xfs/xfs_inode.h
@@ -500,7 +500,7 @@ void xfs_mark_inode_dirty_sync(xfs_inode_t *);
500#define IHOLD(ip) \ 500#define IHOLD(ip) \
501do { \ 501do { \
502 ASSERT(atomic_read(&VFS_I(ip)->i_count) > 0) ; \ 502 ASSERT(atomic_read(&VFS_I(ip)->i_count) > 0) ; \
503 atomic_inc(&(VFS_I(ip)->i_count)); \ 503 ihold(VFS_I(ip)); \
504 trace_xfs_ihold(ip, _THIS_IP_); \ 504 trace_xfs_ihold(ip, _THIS_IP_); \
505} while (0) 505} while (0)
506 506