diff options
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/nfs4proc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 982b4527551d..9da4bd55eb30 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -2184,6 +2184,13 @@ static int nfs4_do_setattr(struct inode *inode, struct rpc_cred *cred, | |||
2184 | err = _nfs4_do_setattr(inode, cred, fattr, sattr, state); | 2184 | err = _nfs4_do_setattr(inode, cred, fattr, sattr, state); |
2185 | switch (err) { | 2185 | switch (err) { |
2186 | case -NFS4ERR_OPENMODE: | 2186 | case -NFS4ERR_OPENMODE: |
2187 | if (!(sattr->ia_valid & ATTR_SIZE)) { | ||
2188 | pr_warn_once("NFSv4: server %s is incorrectly " | ||
2189 | "applying open mode checks to " | ||
2190 | "a SETATTR that is not " | ||
2191 | "changing file size.\n", | ||
2192 | server->nfs_client->cl_hostname); | ||
2193 | } | ||
2187 | if (state && !(state->state & FMODE_WRITE)) { | 2194 | if (state && !(state->state & FMODE_WRITE)) { |
2188 | err = -EBADF; | 2195 | err = -EBADF; |
2189 | if (sattr->ia_valid & ATTR_OPEN) | 2196 | if (sattr->ia_valid & ATTR_OPEN) |