mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
UPSTREAM: ANDROID: fuse-bpf: Close backing fds in fuse_dentry_revalidate
Bug: 202785178 Test: fuse_test runs, no leak on Android Signed-off-by: Paul Lawrence <paullawrence@google.com> Change-Id: If3c8dbe680f21c646e98f66140b842869c2c5abf
This commit is contained in:
parent
f0e6d95711
commit
950ab97234
1 changed files with 9 additions and 0 deletions
|
|
@ -237,6 +237,15 @@ static int fuse_dentry_revalidate(struct dentry *entry, unsigned int flags)
|
|||
&entry->d_name, &outarg, &bpf_outarg);
|
||||
ret = fuse_simple_request(fm, &args);
|
||||
dput(parent);
|
||||
|
||||
/*
|
||||
* TODO This doesn't seem sufficient, though we don't plan to
|
||||
* change the backing file ever, so not sure what is correct
|
||||
* here yet, especially as we can't return an error to user
|
||||
*/
|
||||
if (bpf_outarg.backing_action == FUSE_ACTION_REPLACE)
|
||||
__close_fd(fm->fc->task->files, bpf_outarg.backing_fd);
|
||||
|
||||
/* Zero nodeid is same as -ENOENT */
|
||||
if (!ret && !outarg.nodeid)
|
||||
ret = -ENOENT;
|
||||
|
|
|
|||
Loading…
Reference in a new issue