Skip to content
Commit ea5dc046 authored by Jeffle Xu's avatar Jeffle Xu Committed by David Howells
Browse files

cachefiles: unmark inode in use in error path



Unmark inode in use if error encountered. If the in-use flag leakage
occurs in cachefiles_open_file(), Cachefiles will complain "Inode
already in use" when later another cookie with the same index key is
looked up.

If the in-use flag leakage occurs in cachefiles_create_tmpfile(), though
the "Inode already in use" warning won't be triggered, fix the leakage
anyway.

Reported-by: default avatarGao Xiang <hsiangkao@linux.alibaba.com>
Fixes: 1f08c925 ("cachefiles: Implement backing file wrangling")
Signed-off-by: default avatarJeffle Xu <jefflexu@linux.alibaba.com>
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
cc: linux-cachefs@redhat.com
Link: https://listman.redhat.com/archives/linux-cachefs/2022-March/006615.html # v1
Link: https://listman.redhat.com/archives/linux-cachefs/2022-March/006618.html # v2
parent 42e7a03d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment