9pfs: xattrcreate requires non-opened fids
commitdd654e0365c7b70df01920f1fca88dd7089eeb5d
authorGreg Kurz <groug@kaod.org>
Tue, 1 Nov 2016 11:00:40 +0000 (1 12:00 +0100)
committerGreg Kurz <groug@kaod.org>
Tue, 1 Nov 2016 11:03:02 +0000 (1 12:03 +0100)
treeda08c3635728b50419ad5831aae2a224ccfefc94
parent3b79ef2cf48805dc693a8b0c82e05e0abeaa64f8
9pfs: xattrcreate requires non-opened fids

The xattrcreate operation only makes sense on a freshly cloned fid
actually, since any open state would be leaked because of the fid_type
change. This is indeed what the linux kernel client does:

fid = clone_fid(fid);
[...]
retval = p9_client_xattrcreate(fid, name, value_len, flags);

This patch also reverts commit ff55e94d23ae since we are sure that a fid
with type P9_FID_NONE doesn't have a previously allocated xattr.

Signed-off-by: Greg Kurz <groug@kaod.org>
hw/9pfs/9p.c