nfsd: properly convert return from commit_metadata to __be32
authorJeff Layton <jlayton@primarydata.com>
Thu, 3 Jul 2014 11:54:19 +0000 (07:54 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Thu, 10 Jul 2014 00:55:02 +0000 (20:55 -0400)
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: Jeff Layton <jlayton@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/vfs.c

index e1b792ada45ba523205b252b72abef34fb0732e8..f501a9b5c9df18f5ec7cc360d385aa0c9dfb8344 100644 (file)
@@ -463,7 +463,7 @@ out_put_write_access:
        if (size_change)
                put_write_access(inode);
        if (!err)
-               err = commit_metadata(fhp);
+               err = nfserrno(commit_metadata(fhp));
 out:
        return err;
 }
@@ -1122,7 +1122,7 @@ nfsd_create_setattr(struct svc_rqst *rqstp, struct svc_fh *resfhp,
        if (iap->ia_valid)
                return nfsd_setattr(rqstp, resfhp, iap, 0, (time_t)0);
        /* 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.