mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
xfs: Support setting FMODE_CAN_ATOMIC_WRITE
Set FMODE_CAN_ATOMIC_WRITE flag if we can atomic write for that inode. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: "Darrick J. Wong" <djwong@kernel.org> Signed-off-by: John Garry <john.g.garry@oracle.com> Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: John Garry <john.g.garry@oracle.com> Tested-by: Ojaswin Mujoo <ojaswin@linux.ibm.com> #On ppc64
This commit is contained in:
parent
f096207d32
commit
3af5298ce9
@ -1223,6 +1223,8 @@ xfs_file_open(
|
||||
if (xfs_is_shutdown(XFS_M(inode->i_sb)))
|
||||
return -EIO;
|
||||
file->f_mode |= FMODE_NOWAIT | FMODE_CAN_ODIRECT;
|
||||
if (xfs_inode_can_atomicwrite(XFS_I(inode)))
|
||||
file->f_mode |= FMODE_CAN_ATOMIC_WRITE;
|
||||
return generic_file_open(inode, file);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user