mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
UPSTREAM: ANDROID: fuse-bpf: Report errors to finalize
Ensure finalize has access to the returned error code, if it had one. Test: generic/377 Bug: 217570523 Signed-off-by: Daniel Rosenberg <drosen@google.com> Change-Id: Id9a0aca10c3158f8b414e0cbc2dd1282bb5ef16b
This commit is contained in:
parent
66d1fc6d06
commit
d932a916a2
2 changed files with 9 additions and 4 deletions
|
|
@ -557,12 +557,15 @@ int fuse_listxattr_backing(struct fuse_args *fa, struct dentry *dentry,
|
|||
vfs_listxattr(get_fuse_dentry(dentry)->backing_path.dentry,
|
||||
list, size);
|
||||
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
if (fa->out_argvar)
|
||||
fa->out_args[0].size = ret;
|
||||
else
|
||||
((struct fuse_getxattr_out *)fa->out_args[0].value)->size = ret;
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
void *fuse_listxattr_finalize(struct fuse_args *fa, struct dentry *dentry,
|
||||
|
|
@ -570,11 +573,13 @@ void *fuse_listxattr_finalize(struct fuse_args *fa, struct dentry *dentry,
|
|||
{
|
||||
struct fuse_getxattr_out *fgo;
|
||||
|
||||
if (fa->error_in)
|
||||
return NULL;
|
||||
|
||||
if (fa->out_argvar)
|
||||
return ERR_PTR(fa->out_args[0].size);
|
||||
|
||||
fgo = fa->out_args[0].value;
|
||||
|
||||
return ERR_PTR(fgo->size);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1843,12 +1843,12 @@ struct fuse_err_ret {
|
|||
ERR_PTR(backing(&fa, args)), \
|
||||
true, \
|
||||
}; \
|
||||
if (IS_ERR(fer.result)) \
|
||||
fa.error_in = PTR_ERR(fer.result); \
|
||||
if (!(ext_flags & FUSE_BPF_POST_FILTER)) \
|
||||
break; \
|
||||
\
|
||||
fa.opcode |= FUSE_POSTFILTER; \
|
||||
if (IS_ERR(fer.result)) \
|
||||
fa.error_in = PTR_ERR(fer.result); \
|
||||
for (i = 0; i < fa.out_numargs; ++i) \
|
||||
fa.in_args[fa.in_numargs++] = \
|
||||
(struct fuse_in_arg) { \
|
||||
|
|
|
|||
Loading…
Reference in a new issue