提交 722b620d 编写于 作者: J Jeff Layton 提交者: J. Bruce Fields

nfsd: properly convert return from commit_metadata to __be32

Commit 2a7420c03e504 (nfsd: Ensure that nfsd_create_setattr commits
files to stable storage), added a couple of calls to commit_metadata,
but doesn't convert their return codes to __be32 in the appropriate
places.

Cc: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: NJeff Layton <jlayton@primarydata.com>
Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
上级 2dd6e458
...@@ -463,7 +463,7 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap, ...@@ -463,7 +463,7 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap,
if (size_change) if (size_change)
put_write_access(inode); put_write_access(inode);
if (!err) if (!err)
err = commit_metadata(fhp); err = nfserrno(commit_metadata(fhp));
out: out:
return err; return err;
} }
...@@ -1122,7 +1122,7 @@ nfsd_create_setattr(struct svc_rqst *rqstp, struct svc_fh *resfhp, ...@@ -1122,7 +1122,7 @@ nfsd_create_setattr(struct svc_rqst *rqstp, struct svc_fh *resfhp,
if (iap->ia_valid) if (iap->ia_valid)
return nfsd_setattr(rqstp, resfhp, iap, 0, (time_t)0); return nfsd_setattr(rqstp, resfhp, iap, 0, (time_t)0);
/* Callers expect file metadata to be committed here */ /* Callers expect file metadata to be committed here */
return commit_metadata(resfhp); return nfserrno(commit_metadata(resfhp));
} }
/* HPUX client sometimes creates a file in mode 000, and sets size to 0. /* HPUX client sometimes creates a file in mode 000, and sets size to 0.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册