Skip to contentSkip to conversation

nfsd: properly convert return from commit_metadata to __be32

PATCH In review Jeff Layton 3 participants 3 messages Jul 3, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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 <[email protected]>
---
 fs/nfsd/vfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/nfsd/vfs.c +2 -2
index e1b792ada45b..f501a9b5c9df 100644
@@ -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.
Signature · 1 line
1.9.3
#1 lore raw
Quoted 34 lines · Jeff Layton

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 <[email protected]>
---
 fs/nfsd/vfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/nfsd/vfs.c +2 -3
index e1b792ada45b..f501a9b5c9df 100644
@@ -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.
--
Quoted 2 lines

1.9.3

Doh! Thanks Jeff!...

Signature · 5 lines
Trond Myklebust

Linux NFS client maintainer, PrimaryData

[email protected]
#2 lore raw
In reply to Jeff Layton
Quoted 4 lines · Jeff Layton

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.

Thanks, applying.--b.

Quoted 32 lines
Cc Trond Myklebust <[email protected]>
---
 fs/nfsd/vfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/nfsd/vfs.c +2 -2
index e1b792ada45b..f501a9b5c9df 100644
@@ -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.
Signature · 1 line
1.9.3