diff options
author | Dave Chinner <david@fromorbit.com> | 2015-02-23 18:24:07 -0500 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2015-02-23 18:24:07 -0500 |
commit | 3cabb836d801c3ad791c2dc6be07ec5819ab0a37 (patch) | |
tree | dbc5bff557d23e978fd3c8920c7d99d8c09fa272 /fs/xfs/xfs_inode.h | |
parent | 83d5f01858b56db69c8e4ca5389ef7c29bfdb5dd (diff) | |
parent | 444a702231412e82fb1c09679adc159301e9242c (diff) |
Merge branch 'xfs-misc-fixes-for-4.1' into for-next
Diffstat (limited to 'fs/xfs/xfs_inode.h')
-rw-r--r-- | fs/xfs/xfs_inode.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h index a1cd55f3f351..c73b63d51bc1 100644 --- a/fs/xfs/xfs_inode.h +++ b/fs/xfs/xfs_inode.h | |||
@@ -391,6 +391,28 @@ int xfs_zero_eof(struct xfs_inode *ip, xfs_off_t offset, | |||
391 | int xfs_iozero(struct xfs_inode *ip, loff_t pos, size_t count); | 391 | int xfs_iozero(struct xfs_inode *ip, loff_t pos, size_t count); |
392 | 392 | ||
393 | 393 | ||
394 | /* from xfs_iops.c */ | ||
395 | /* | ||
396 | * When setting up a newly allocated inode, we need to call | ||
397 | * xfs_finish_inode_setup() once the inode is fully instantiated at | ||
398 | * the VFS level to prevent the rest of the world seeing the inode | ||
399 | * before we've completed instantiation. Otherwise we can do it | ||
400 | * the moment the inode lookup is complete. | ||
401 | */ | ||
402 | extern void xfs_setup_inode(struct xfs_inode *ip); | ||
403 | static inline void xfs_finish_inode_setup(struct xfs_inode *ip) | ||
404 | { | ||
405 | xfs_iflags_clear(ip, XFS_INEW); | ||
406 | barrier(); | ||
407 | unlock_new_inode(VFS_I(ip)); | ||
408 | } | ||
409 | |||
410 | static inline void xfs_setup_existing_inode(struct xfs_inode *ip) | ||
411 | { | ||
412 | xfs_setup_inode(ip); | ||
413 | xfs_finish_inode_setup(ip); | ||
414 | } | ||
415 | |||
394 | #define IHOLD(ip) \ | 416 | #define IHOLD(ip) \ |
395 | do { \ | 417 | do { \ |
396 | ASSERT(atomic_read(&VFS_I(ip)->i_count) > 0) ; \ | 418 | ASSERT(atomic_read(&VFS_I(ip)->i_count) > 0) ; \ |