mirror of https://github.com/proxmox/mirror_qemu
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>master
parent
ff59c5ee78
commit
b858e80a02
|
@ -2472,8 +2472,7 @@ static int v9fs_xattr_write(V9fsState *s, V9fsPDU *pdu, V9fsFidState *fidp,
|
||||||
|
|
||||||
|
|
||||||
if (fidp->fs.xattr.len < off) {
|
if (fidp->fs.xattr.len < off) {
|
||||||
err = -ENOSPC;
|
return -ENOSPC;
|
||||||
goto out;
|
|
||||||
}
|
}
|
||||||
write_count = fidp->fs.xattr.len - off;
|
write_count = fidp->fs.xattr.len - off;
|
||||||
if (write_count > count) {
|
if (write_count > count) {
|
||||||
|
@ -2499,7 +2498,7 @@ static int v9fs_xattr_write(V9fsState *s, V9fsPDU *pdu, V9fsFidState *fidp,
|
||||||
off += to_copy;
|
off += to_copy;
|
||||||
write_count -= to_copy;
|
write_count -= to_copy;
|
||||||
}
|
}
|
||||||
out:
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3067,8 +3066,7 @@ static int coroutine_fn v9fs_complete_rename(V9fsPDU *pdu, V9fsFidState *fidp,
|
||||||
if (newdirfid != -1) {
|
if (newdirfid != -1) {
|
||||||
dirfidp = get_fid(pdu, newdirfid);
|
dirfidp = get_fid(pdu, newdirfid);
|
||||||
if (dirfidp == NULL) {
|
if (dirfidp == NULL) {
|
||||||
err = -ENOENT;
|
return -ENOENT;
|
||||||
goto out_nofid;
|
|
||||||
}
|
}
|
||||||
if (fidp->fid_type != P9_FID_NONE) {
|
if (fidp->fid_type != P9_FID_NONE) {
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
|
@ -3111,7 +3109,6 @@ out:
|
||||||
put_fid(pdu, dirfidp);
|
put_fid(pdu, dirfidp);
|
||||||
}
|
}
|
||||||
v9fs_path_free(&new_path);
|
v9fs_path_free(&new_path);
|
||||||
out_nofid:
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue