summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2023-05-15 16:35:44 +0300
committerChuck Lever <chuck.lever@oracle.com>2023-06-05 16:01:42 +0300
commit3434d7aa77d24c5c4b3d4385084cfdb607f05dec (patch)
tree07743dc1792cfaf1b015a9fcef5a4d1cf6d4be45
parent442a629009818de2f8d9731cafb96e111ca8e4e6 (diff)
downloadlinux-3434d7aa77d24c5c4b3d4385084cfdb607f05dec.tar.xz
NFSD: Clean up nfsctl_transaction_write()
For easier readability, follow the common convention: if (error) handle_error; continue_normally; No behavior change is expected. Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
-rw-r--r--fs/nfsd/nfsctl.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index 2ecea3b318eb..df0aae211a49 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -109,12 +109,12 @@ static ssize_t nfsctl_transaction_write(struct file *file, const char __user *bu
if (IS_ERR(data))
return PTR_ERR(data);
- rv = write_op[ino](file, data, size);
- if (rv >= 0) {
- simple_transaction_set(file, rv);
- rv = size;
- }
- return rv;
+ rv = write_op[ino](file, data, size);
+ if (rv < 0)
+ return rv;
+
+ simple_transaction_set(file, rv);
+ return size;
}
static ssize_t nfsctl_transaction_read(struct file *file, char __user *buf, size_t size, loff_t *pos)