mirror of
https://github.com/openharmony/third_party_libfuse.git
synced 2026-07-21 09:05:22 -04:00
Don't unhash name in FORGET
This resulted in ENOENT being returned for unlinked but still open files if the kernel sent a FORGET request for the parent directory. Discovered with fs_racer in LTP.
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
|
||||
* Fix hang in wait_on_path(). Reported by Ville Silventoinen
|
||||
|
||||
* Don't unhash name in FORGET. This resulted in ENOENT being
|
||||
returned for unlinked but still open files if the kernel sent a
|
||||
FORGET request for the parent directory.
|
||||
|
||||
2011-12-08 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Fix build if FUSE_NODE_SLAB is not defined. Patch by Emmanuel
|
||||
|
||||
+1
-2
@@ -775,7 +775,7 @@ static void delete_node(struct fuse *f, struct node *node)
|
||||
(unsigned long long) node->nodeid);
|
||||
|
||||
assert(node->treelock == 0);
|
||||
assert(!node->name);
|
||||
unhash_name(f, node);
|
||||
if (lru_enabled(f))
|
||||
remove_node_lru(node);
|
||||
unhash_id(f, node);
|
||||
@@ -1258,7 +1258,6 @@ static void forget_node(struct fuse *f, fuse_ino_t nodeid, uint64_t nlookup)
|
||||
assert(node->nlookup >= nlookup);
|
||||
node->nlookup -= nlookup;
|
||||
if (!node->nlookup) {
|
||||
unhash_name(f, node);
|
||||
unref_node(f, node);
|
||||
} else if (lru_enabled(f) && node->nlookup == 1) {
|
||||
set_forget_time(f, node);
|
||||
|
||||
Reference in New Issue
Block a user