Skip to content

Commit d19e018

Browse files
Trond Myklebustamschuma-ntap
authored andcommitted
NFS: Do not report writeback errors in nfs_getattr()
The result of the writeback, whether it is an ENOSPC or an EIO, or anything else, does not inhibit the NFS client from reporting the correct file timestamps. Fixes: 79566ef ("NFS: Getattr doesn't require data sync semantics") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
1 parent e0caaf7 commit d19e018

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

fs/nfs/inode.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -853,12 +853,9 @@ int nfs_getattr(struct user_namespace *mnt_userns, const struct path *path,
853853
}
854854

855855
/* Flush out writes to the server in order to update c/mtime. */
856-
if ((request_mask & (STATX_CTIME|STATX_MTIME)) &&
857-
S_ISREG(inode->i_mode)) {
858-
err = filemap_write_and_wait(inode->i_mapping);
859-
if (err)
860-
goto out;
861-
}
856+
if ((request_mask & (STATX_CTIME | STATX_MTIME)) &&
857+
S_ISREG(inode->i_mode))
858+
filemap_write_and_wait(inode->i_mapping);
862859

863860
/*
864861
* We may force a getattr if the user cares about atime.

0 commit comments

Comments
 (0)