summaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_main.c
diff options
context:
space:
mode:
authorLars Ellenberg2014-05-05 14:05:54 +0200
committerPhilipp Reisner2014-07-10 18:35:17 +0200
commit4a521cca9b9b2e943efb86645540aecccfeab0fc (patch)
treec42f93313e79afecfda220fd134f953bdaaaaf56 /drivers/block/drbd/drbd_main.c
parentdrbd: debugfs: add in_flight_summary data (diff)
downloadkernel-qcow2-linux-4a521cca9b9b2e943efb86645540aecccfeab0fc.tar.gz
kernel-qcow2-linux-4a521cca9b9b2e943efb86645540aecccfeab0fc.tar.xz
kernel-qcow2-linux-4a521cca9b9b2e943efb86645540aecccfeab0fc.zip
drbd: debugfs: deal with destructor racing with open of debugfs file
Try to close the race between open() and debugfs_remove_recursive() from inside an object destructor. Once open succeeds, the object should stay around. Open should not succeed if the object has already reached its destructor. This may be overkill, but to make that happen, we check for existence of a parent directory, "stale-ness" of "this" dentry, and serialize kref_get_unless_zero() on the outermost object relevant for this file with d_delete() on this dentry (using the parent's i_mutex). Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_main.c')
0 files changed, 0 insertions, 0 deletions