From: Dave Chinner Date: Mon, 23 Feb 2015 23:24:07 +0000 (+1100) Subject: Merge branch 'xfs-misc-fixes-for-4.1' into for-next X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3cabb836d801c3ad791c2dc6be07ec5819ab0a37;p=linux-beck.git Merge branch 'xfs-misc-fixes-for-4.1' into for-next --- 3cabb836d801c3ad791c2dc6be07ec5819ab0a37 diff --cc fs/xfs/xfs_inode.h index a1cd55f3f351,8e82b41d2050..c73b63d51bc1 --- a/fs/xfs/xfs_inode.h +++ b/fs/xfs/xfs_inode.h @@@ -384,13 -384,34 +384,35 @@@ enum xfs_prealloc_flags XFS_PREALLOC_INVISIBLE = (1 << 4), }; -int xfs_update_prealloc_flags(struct xfs_inode *, - enum xfs_prealloc_flags); -int xfs_zero_eof(struct xfs_inode *, xfs_off_t, xfs_fsize_t); -int xfs_iozero(struct xfs_inode *, loff_t, size_t); +int xfs_update_prealloc_flags(struct xfs_inode *ip, + enum xfs_prealloc_flags flags); +int xfs_zero_eof(struct xfs_inode *ip, xfs_off_t offset, + xfs_fsize_t isize, bool *did_zeroing); +int xfs_iozero(struct xfs_inode *ip, loff_t pos, size_t count); + /* from xfs_iops.c */ + /* + * When setting up a newly allocated inode, we need to call + * xfs_finish_inode_setup() once the inode is fully instantiated at + * the VFS level to prevent the rest of the world seeing the inode + * before we've completed instantiation. Otherwise we can do it + * the moment the inode lookup is complete. + */ + extern void xfs_setup_inode(struct xfs_inode *ip); + static inline void xfs_finish_inode_setup(struct xfs_inode *ip) + { + xfs_iflags_clear(ip, XFS_INEW); + barrier(); + unlock_new_inode(VFS_I(ip)); + } + + static inline void xfs_setup_existing_inode(struct xfs_inode *ip) + { + xfs_setup_inode(ip); + xfs_finish_inode_setup(ip); + } + #define IHOLD(ip) \ do { \ ASSERT(atomic_read(&VFS_I(ip)->i_count) > 0) ; \