aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_debugfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/drbd/drbd_debugfs.c')
-rw-r--r--drivers/block/drbd/drbd_debugfs.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/block/drbd/drbd_debugfs.c b/drivers/block/drbd/drbd_debugfs.c
index a6ee3d750c30..6b88a35fb048 100644
--- a/drivers/block/drbd/drbd_debugfs.c
+++ b/drivers/block/drbd/drbd_debugfs.c
@@ -419,14 +419,6 @@ static int in_flight_summary_show(struct seq_file *m, void *pos)
419 return 0; 419 return 0;
420} 420}
421 421
422/* simple_positive(file->f_path.dentry) respectively debugfs_positive(),
423 * but neither is "reachable" from here.
424 * So we have our own inline version of it above. :-( */
425static inline int debugfs_positive(struct dentry *dentry)
426{
427 return d_really_is_positive(dentry) && !d_unhashed(dentry);
428}
429
430/* make sure at *open* time that the respective object won't go away. */ 422/* make sure at *open* time that the respective object won't go away. */
431static int drbd_single_open(struct file *file, int (*show)(struct seq_file *, void *), 423static int drbd_single_open(struct file *file, int (*show)(struct seq_file *, void *),
432 void *data, struct kref *kref, 424 void *data, struct kref *kref,
@@ -444,7 +436,7 @@ static int drbd_single_open(struct file *file, int (*show)(struct seq_file *, vo
444 /* serialize with d_delete() */ 436 /* serialize with d_delete() */
445 mutex_lock(&d_inode(parent)->i_mutex); 437 mutex_lock(&d_inode(parent)->i_mutex);
446 /* Make sure the object is still alive */ 438 /* Make sure the object is still alive */
447 if (debugfs_positive(file->f_path.dentry) 439 if (simple_positive(file->f_path.dentry)
448 && kref_get_unless_zero(kref)) 440 && kref_get_unless_zero(kref))
449 ret = 0; 441 ret = 0;
450 mutex_unlock(&d_inode(parent)->i_mutex); 442 mutex_unlock(&d_inode(parent)->i_mutex);