diff options
author | David Howells <dhowells@redhat.com> | 2019-05-12 10:31:23 +0300 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2019-05-15 19:35:53 +0300 |
commit | 773e0c40253443e0ce5491cb0e414b62f7cc45ed (patch) | |
tree | 48752e7b9ff1ec36c9baeadc7e4f11ebf16addf7 /fs/afs/internal.h | |
parent | cc1dd5c85cb70ebe09ccf1cc34f29af65442a10f (diff) | |
download | linux-773e0c40253443e0ce5491cb0e414b62f7cc45ed.tar.xz |
afs: Fix afs_xattr_get_yfs() to not try freeing an error value
afs_xattr_get_yfs() tries to free yacl, which may hold an error value (say
if yfs_fs_fetch_opaque_acl() failed and returned an error).
Fix this by allocating yacl up front (since it's a fixed-length struct,
unlike afs_acl) and passing it in to the RPC function. This also allows
the flags to be placed in the object rather than passing them through to
the RPC function.
Fixes: ae46578b963f ("afs: Get YFS ACLs and information through xattrs")
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/internal.h')
-rw-r--r-- | fs/afs/internal.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/afs/internal.h b/fs/afs/internal.h index b3cd6e8ad59d..74ee0f8ef8dd 100644 --- a/fs/afs/internal.h +++ b/fs/afs/internal.h @@ -1382,7 +1382,7 @@ struct yfs_acl { }; extern void yfs_free_opaque_acl(struct yfs_acl *); -extern struct yfs_acl *yfs_fs_fetch_opaque_acl(struct afs_fs_cursor *, unsigned int); +extern struct yfs_acl *yfs_fs_fetch_opaque_acl(struct afs_fs_cursor *, struct yfs_acl *); extern int yfs_fs_store_opaque_acl2(struct afs_fs_cursor *, const struct afs_acl *); /* |