Replies: 1 comment
-
Went through the code, That said, I don't see in what cases the data structure could end up in this state for |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The following code, specifically within the loop, is a bit strange to me:
If I understand it, if the dentry is NOT hashed, then let's unset and destroy it. But if it's not hashed, then what does __dentry_unset() do at all? Unhashed means that dentry->hash is empty, therefore __dentry_unset() can't list_del_init() it!
And indeed, we can see in the code coverage, that this path is not really called at all (https://build.gluster.org/job/line-coverage/1550/Line_20Coverage_20Report/libglusterfs/src/inode.c.gcov.html ):
426 10190680 : list_for_each_entry_safe(dentry, t, &inode->dentry_list, inode_list)
427 : {
428 5109382 : if (!__is_dentry_hashed(dentry))
429 0 : dentry_destroy(__dentry_unset(dentry));
Beta Was this translation helpful? Give feedback.
All reactions