Revisão | b858e80a02ca64b9208499155f4dab4ef298b523 (tree) |
---|---|
Hora | 2020-01-20 23:11:39 |
Autor | Daniel Henrique Barboza <danielhb413@gmai...> |
Commiter | Greg Kurz |
9pfs/9p.c: remove unneeded labels
'out' label in v9fs_xattr_write() and 'out_nofid' label in
v9fs_complete_rename() can be replaced by appropriate return
calls.
CC: Greg Kurz <groug@kaod.org>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Acked-by: Greg Kurz <groug@kaod.org>
Signed-off-by: Greg Kurz <groug@kaod.org>
@@ -2472,8 +2472,7 @@ static int v9fs_xattr_write(V9fsState *s, V9fsPDU *pdu, V9fsFidState *fidp, | ||
2472 | 2472 | |
2473 | 2473 | |
2474 | 2474 | if (fidp->fs.xattr.len < off) { |
2475 | - err = -ENOSPC; | |
2476 | - goto out; | |
2475 | + return -ENOSPC; | |
2477 | 2476 | } |
2478 | 2477 | write_count = fidp->fs.xattr.len - off; |
2479 | 2478 | if (write_count > count) { |
@@ -2499,7 +2498,7 @@ static int v9fs_xattr_write(V9fsState *s, V9fsPDU *pdu, V9fsFidState *fidp, | ||
2499 | 2498 | off += to_copy; |
2500 | 2499 | write_count -= to_copy; |
2501 | 2500 | } |
2502 | -out: | |
2501 | + | |
2503 | 2502 | return err; |
2504 | 2503 | } |
2505 | 2504 |
@@ -3067,8 +3066,7 @@ static int coroutine_fn v9fs_complete_rename(V9fsPDU *pdu, V9fsFidState *fidp, | ||
3067 | 3066 | if (newdirfid != -1) { |
3068 | 3067 | dirfidp = get_fid(pdu, newdirfid); |
3069 | 3068 | if (dirfidp == NULL) { |
3070 | - err = -ENOENT; | |
3071 | - goto out_nofid; | |
3069 | + return -ENOENT; | |
3072 | 3070 | } |
3073 | 3071 | if (fidp->fid_type != P9_FID_NONE) { |
3074 | 3072 | err = -EINVAL; |
@@ -3111,7 +3109,6 @@ out: | ||
3111 | 3109 | put_fid(pdu, dirfidp); |
3112 | 3110 | } |
3113 | 3111 | v9fs_path_free(&new_path); |
3114 | -out_nofid: | |
3115 | 3112 | return err; |
3116 | 3113 | } |
3117 | 3114 |