|
@@ -868,27 +868,6 @@ xfs_fs_dirty_inode(
|
|
XFS_I(inode)->i_update_core = 1;
|
|
XFS_I(inode)->i_update_core = 1;
|
|
}
|
|
}
|
|
|
|
|
|
-STATIC int
|
|
|
|
-xfs_log_inode(
|
|
|
|
- struct xfs_inode *ip)
|
|
|
|
-{
|
|
|
|
- struct xfs_mount *mp = ip->i_mount;
|
|
|
|
- struct xfs_trans *tp;
|
|
|
|
- int error;
|
|
|
|
-
|
|
|
|
- tp = xfs_trans_alloc(mp, XFS_TRANS_FSYNC_TS);
|
|
|
|
- error = xfs_trans_reserve(tp, 0, XFS_FSYNC_TS_LOG_RES(mp), 0, 0, 0);
|
|
|
|
- if (error) {
|
|
|
|
- xfs_trans_cancel(tp, 0);
|
|
|
|
- return error;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- xfs_ilock(ip, XFS_ILOCK_EXCL);
|
|
|
|
- xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
|
|
|
|
- xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
|
|
|
|
- return xfs_trans_commit(tp, 0);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
STATIC int
|
|
STATIC int
|
|
xfs_fs_write_inode(
|
|
xfs_fs_write_inode(
|
|
struct inode *inode,
|
|
struct inode *inode,
|
|
@@ -902,8 +881,6 @@ xfs_fs_write_inode(
|
|
|
|
|
|
if (XFS_FORCED_SHUTDOWN(mp))
|
|
if (XFS_FORCED_SHUTDOWN(mp))
|
|
return -XFS_ERROR(EIO);
|
|
return -XFS_ERROR(EIO);
|
|
- if (!ip->i_update_core)
|
|
|
|
- return 0;
|
|
|
|
|
|
|
|
if (wbc->sync_mode == WB_SYNC_ALL || wbc->for_kupdate) {
|
|
if (wbc->sync_mode == WB_SYNC_ALL || wbc->for_kupdate) {
|
|
/*
|
|
/*
|
|
@@ -913,11 +890,14 @@ xfs_fs_write_inode(
|
|
* ->sync_fs call do that for thus, which reduces the number
|
|
* ->sync_fs call do that for thus, which reduces the number
|
|
* of synchronous log forces dramatically.
|
|
* of synchronous log forces dramatically.
|
|
*/
|
|
*/
|
|
- error = xfs_log_inode(ip);
|
|
|
|
|
|
+ error = xfs_log_dirty_inode(ip, NULL, 0);
|
|
if (error)
|
|
if (error)
|
|
goto out;
|
|
goto out;
|
|
return 0;
|
|
return 0;
|
|
} else {
|
|
} else {
|
|
|
|
+ if (!ip->i_update_core)
|
|
|
|
+ return 0;
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* We make this non-blocking if the inode is contended, return
|
|
* We make this non-blocking if the inode is contended, return
|
|
* EAGAIN to indicate to the caller that they did not succeed.
|
|
* EAGAIN to indicate to the caller that they did not succeed.
|