diff options
author | David Howells <dhowells@redhat.com> | 2015-03-17 18:26:12 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-15 15:06:58 -0400 |
commit | 75c3cfa855dcedc84e7964269c9b6baf26137959 (patch) | |
tree | 2ef6b8570069d7811542db376c88fbe208a5771d /drivers/block | |
parent | 2b0143b5c986be1ce8408b3aadc4709e0a94429d (diff) |
VFS: assorted weird filesystems: d_inode() annotations
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/drbd/drbd_debugfs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/block/drbd/drbd_debugfs.c b/drivers/block/drbd/drbd_debugfs.c index 9a950022ff88..a6ee3d750c30 100644 --- a/drivers/block/drbd/drbd_debugfs.c +++ b/drivers/block/drbd/drbd_debugfs.c | |||
@@ -424,7 +424,7 @@ static int in_flight_summary_show(struct seq_file *m, void *pos) | |||
424 | * So we have our own inline version of it above. :-( */ | 424 | * So we have our own inline version of it above. :-( */ |
425 | static inline int debugfs_positive(struct dentry *dentry) | 425 | static inline int debugfs_positive(struct dentry *dentry) |
426 | { | 426 | { |
427 | return dentry->d_inode && !d_unhashed(dentry); | 427 | return d_really_is_positive(dentry) && !d_unhashed(dentry); |
428 | } | 428 | } |
429 | 429 | ||
430 | /* make sure at *open* time that the respective object won't go away. */ | 430 | /* make sure at *open* time that the respective object won't go away. */ |
@@ -439,15 +439,15 @@ static int drbd_single_open(struct file *file, int (*show)(struct seq_file *, vo | |||
439 | * or has debugfs_remove() already been called? */ | 439 | * or has debugfs_remove() already been called? */ |
440 | parent = file->f_path.dentry->d_parent; | 440 | parent = file->f_path.dentry->d_parent; |
441 | /* not sure if this can happen: */ | 441 | /* not sure if this can happen: */ |
442 | if (!parent || !parent->d_inode) | 442 | if (!parent || d_really_is_negative(parent)) |
443 | goto out; | 443 | goto out; |
444 | /* serialize with d_delete() */ | 444 | /* serialize with d_delete() */ |
445 | mutex_lock(&parent->d_inode->i_mutex); | 445 | mutex_lock(&d_inode(parent)->i_mutex); |
446 | /* Make sure the object is still alive */ | 446 | /* Make sure the object is still alive */ |
447 | if (debugfs_positive(file->f_path.dentry) | 447 | if (debugfs_positive(file->f_path.dentry) |
448 | && kref_get_unless_zero(kref)) | 448 | && kref_get_unless_zero(kref)) |
449 | ret = 0; | 449 | ret = 0; |
450 | mutex_unlock(&parent->d_inode->i_mutex); | 450 | mutex_unlock(&d_inode(parent)->i_mutex); |
451 | if (!ret) { | 451 | if (!ret) { |
452 | ret = single_open(file, show, data); | 452 | ret = single_open(file, show, data); |
453 | if (ret) | 453 | if (ret) |