return d_obtain_alias(VFS_I(cip));
}
- error = _xfs_log_force(mp, ip->i_itemp->ili_last_lsn,
- XFS_LOG_FORCE | XFS_LOG_SYNC, NULL);
+STATIC int
+xfs_fs_nfs_commit_metadata(
+ struct inode *inode)
+{
+ struct xfs_inode *ip = XFS_I(inode);
+ struct xfs_mount *mp = ip->i_mount;
+ int error = 0;
+
+ xfs_ilock(ip, XFS_ILOCK_SHARED);
+ if (xfs_ipincount(ip)) {
++ error = _xfs_log_force_lsn(mp, ip->i_itemp->ili_last_lsn,
++ XFS_LOG_SYNC, NULL);
+ }
+ xfs_iunlock(ip, XFS_ILOCK_SHARED);
+
+ return error;
+}
+
const struct export_operations xfs_export_operations = {
.encode_fh = xfs_fs_encode_fh,
.fh_to_dentry = xfs_fs_fh_to_dentry,