Skip to content

Commit 3434d7a

Browse files
committed
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 <[email protected]> Signed-off-by: Chuck Lever <[email protected]>
1 parent 442a629 commit 3434d7a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

fs/nfsd/nfsctl.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,12 @@ static ssize_t nfsctl_transaction_write(struct file *file, const char __user *bu
109109
if (IS_ERR(data))
110110
return PTR_ERR(data);
111111

112-
rv = write_op[ino](file, data, size);
113-
if (rv >= 0) {
114-
simple_transaction_set(file, rv);
115-
rv = size;
116-
}
117-
return rv;
112+
rv = write_op[ino](file, data, size);
113+
if (rv < 0)
114+
return rv;
115+
116+
simple_transaction_set(file, rv);
117+
return size;
118118
}
119119

120120
static ssize_t nfsctl_transaction_read(struct file *file, char __user *buf, size_t size, loff_t *pos)

0 commit comments

Comments
 (0)