mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
make simple_positive() public
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -419,14 +419,6 @@ static int in_flight_summary_show(struct seq_file *m, void *pos)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* simple_positive(file->f_path.dentry) respectively debugfs_positive(),
|
||||
* but neither is "reachable" from here.
|
||||
* So we have our own inline version of it above. :-( */
|
||||
static inline int debugfs_positive(struct dentry *dentry)
|
||||
{
|
||||
return d_really_is_positive(dentry) && !d_unhashed(dentry);
|
||||
}
|
||||
|
||||
/* make sure at *open* time that the respective object won't go away. */
|
||||
static int drbd_single_open(struct file *file, int (*show)(struct seq_file *, void *),
|
||||
void *data, struct kref *kref,
|
||||
@@ -444,7 +436,7 @@ static int drbd_single_open(struct file *file, int (*show)(struct seq_file *, vo
|
||||
/* serialize with d_delete() */
|
||||
mutex_lock(&d_inode(parent)->i_mutex);
|
||||
/* Make sure the object is still alive */
|
||||
if (debugfs_positive(file->f_path.dentry)
|
||||
if (simple_positive(file->f_path.dentry)
|
||||
&& kref_get_unless_zero(kref))
|
||||
ret = 0;
|
||||
mutex_unlock(&d_inode(parent)->i_mutex);
|
||||
|
||||
Reference in New Issue
Block a user