summaryrefslogtreecommitdiff
path: root/include/linux/timerqueue.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2025-03-04 03:38:04 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2025-11-16 09:35:01 +0300
commitbacdf1d70bbe2027619c7bbbe48b379a806a9678 (patch)
tree6f36381b620624ff072af66f7128dcb16ab56698 /include/linux/timerqueue.h
parent8a210cacf5dc2a6210ee42aeca5cd03b2400876f (diff)
downloadlinux-bacdf1d70bbe2027619c7bbbe48b379a806a9678.tar.xz
primitives for maintaining persisitency
* d_make_persistent(dentry, inode) - bump refcount, mark persistent and make hashed positive. Return value is a borrowed reference to dentry; it can be used until something removes persistency (at the very least, until the parent gets unlocked, but some filesystems may have stronger exclusion). * d_make_discardable() - remove persistency mark and drop reference. d_make_persistent() is similar to combination of d_instantiate(), dget() and setting flag. The only difference is that unlike d_instantiate() it accepts hashed and unhashed negatives alike. It is always called in strong locking environment (parent held exclusive, or, in some cases, dentry coming from d_alloc_name()); if we ever start using it with parent held only shared and dentry coming from d_alloc_parallel(), we'll need to copy the in-lookup logics from __d_add(). d_make_discardable() is eqiuvalent to combination of removing flag and dput(); since flag removal requires ->d_lock, there's no point trying to avoid taking that for refcount decrement as fast_dput() does. The slow path of dput() has been taken into a helper and reused in d_make_discardable() instead. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions