diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/block/drbd/drbd_debugfs.c | 10 | ||||
| -rw-r--r-- | drivers/block/loop.c | 2 | ||||
| -rw-r--r-- | drivers/infiniband/hw/ipath/ipath_fs.c | 2 | ||||
| -rw-r--r-- | drivers/infiniband/hw/qib/qib_fs.c | 2 | ||||
| -rw-r--r-- | drivers/md/bitmap.c | 4 | ||||
| -rw-r--r-- | drivers/md/md.c | 2 | ||||
| -rw-r--r-- | drivers/usb/gadget/function/f_mass_storage.c | 2 | ||||
| -rw-r--r-- | drivers/usb/gadget/function/storage_common.c | 2 |
8 files changed, 9 insertions, 17 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. :-( */ | ||
| 425 | static 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. */ |
| 431 | static int drbd_single_open(struct file *file, int (*show)(struct seq_file *, void *), | 423 | static 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); |
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 40580dc7f41c..f7a4c9d7f721 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c | |||
| @@ -588,7 +588,7 @@ static ssize_t loop_attr_backing_file_show(struct loop_device *lo, char *buf) | |||
| 588 | 588 | ||
| 589 | spin_lock_irq(&lo->lo_lock); | 589 | spin_lock_irq(&lo->lo_lock); |
| 590 | if (lo->lo_backing_file) | 590 | if (lo->lo_backing_file) |
| 591 | p = d_path(&lo->lo_backing_file->f_path, buf, PAGE_SIZE - 1); | 591 | p = file_path(lo->lo_backing_file, buf, PAGE_SIZE - 1); |
| 592 | spin_unlock_irq(&lo->lo_lock); | 592 | spin_unlock_irq(&lo->lo_lock); |
| 593 | 593 | ||
| 594 | if (IS_ERR_OR_NULL(p)) | 594 | if (IS_ERR_OR_NULL(p)) |
diff --git a/drivers/infiniband/hw/ipath/ipath_fs.c b/drivers/infiniband/hw/ipath/ipath_fs.c index 1ca8e32a9592..25422a3a7238 100644 --- a/drivers/infiniband/hw/ipath/ipath_fs.c +++ b/drivers/infiniband/hw/ipath/ipath_fs.c | |||
| @@ -277,7 +277,7 @@ static int remove_file(struct dentry *parent, char *name) | |||
| 277 | } | 277 | } |
| 278 | 278 | ||
| 279 | spin_lock(&tmp->d_lock); | 279 | spin_lock(&tmp->d_lock); |
| 280 | if (!d_unhashed(tmp) && d_really_is_positive(tmp)) { | 280 | if (simple_positive(tmp)) { |
| 281 | dget_dlock(tmp); | 281 | dget_dlock(tmp); |
| 282 | __d_drop(tmp); | 282 | __d_drop(tmp); |
| 283 | spin_unlock(&tmp->d_lock); | 283 | spin_unlock(&tmp->d_lock); |
diff --git a/drivers/infiniband/hw/qib/qib_fs.c b/drivers/infiniband/hw/qib/qib_fs.c index bdd5d3857203..13ef22bd9459 100644 --- a/drivers/infiniband/hw/qib/qib_fs.c +++ b/drivers/infiniband/hw/qib/qib_fs.c | |||
| @@ -455,7 +455,7 @@ static int remove_file(struct dentry *parent, char *name) | |||
| 455 | } | 455 | } |
| 456 | 456 | ||
| 457 | spin_lock(&tmp->d_lock); | 457 | spin_lock(&tmp->d_lock); |
| 458 | if (!d_unhashed(tmp) && d_really_is_positive(tmp)) { | 458 | if (simple_positive(tmp)) { |
| 459 | __d_drop(tmp); | 459 | __d_drop(tmp); |
| 460 | spin_unlock(&tmp->d_lock); | 460 | spin_unlock(&tmp->d_lock); |
| 461 | simple_unlink(d_inode(parent), tmp); | 461 | simple_unlink(d_inode(parent), tmp); |
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index 135a0907e9de..ed2346ddf4c9 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c | |||
| @@ -839,7 +839,7 @@ static void bitmap_file_kick(struct bitmap *bitmap) | |||
| 839 | if (bitmap->storage.file) { | 839 | if (bitmap->storage.file) { |
| 840 | path = kmalloc(PAGE_SIZE, GFP_KERNEL); | 840 | path = kmalloc(PAGE_SIZE, GFP_KERNEL); |
| 841 | if (path) | 841 | if (path) |
| 842 | ptr = d_path(&bitmap->storage.file->f_path, | 842 | ptr = file_path(bitmap->storage.file, |
| 843 | path, PAGE_SIZE); | 843 | path, PAGE_SIZE); |
| 844 | 844 | ||
| 845 | printk(KERN_ALERT | 845 | printk(KERN_ALERT |
| @@ -1927,7 +1927,7 @@ void bitmap_status(struct seq_file *seq, struct bitmap *bitmap) | |||
| 1927 | chunk_kb ? "KB" : "B"); | 1927 | chunk_kb ? "KB" : "B"); |
| 1928 | if (bitmap->storage.file) { | 1928 | if (bitmap->storage.file) { |
| 1929 | seq_printf(seq, ", file: "); | 1929 | seq_printf(seq, ", file: "); |
| 1930 | seq_path(seq, &bitmap->storage.file->f_path, " \t\n"); | 1930 | seq_file_path(seq, bitmap->storage.file, " \t\n"); |
| 1931 | } | 1931 | } |
| 1932 | 1932 | ||
| 1933 | seq_printf(seq, "\n"); | 1933 | seq_printf(seq, "\n"); |
diff --git a/drivers/md/md.c b/drivers/md/md.c index df92d30ca054..d429c30cd514 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
| @@ -5766,7 +5766,7 @@ static int get_bitmap_file(struct mddev *mddev, void __user * arg) | |||
| 5766 | /* bitmap disabled, zero the first byte and copy out */ | 5766 | /* bitmap disabled, zero the first byte and copy out */ |
| 5767 | if (!mddev->bitmap_info.file) | 5767 | if (!mddev->bitmap_info.file) |
| 5768 | file->pathname[0] = '\0'; | 5768 | file->pathname[0] = '\0'; |
| 5769 | else if ((ptr = d_path(&mddev->bitmap_info.file->f_path, | 5769 | else if ((ptr = file_path(mddev->bitmap_info.file, |
| 5770 | file->pathname, sizeof(file->pathname))), | 5770 | file->pathname, sizeof(file->pathname))), |
| 5771 | IS_ERR(ptr)) | 5771 | IS_ERR(ptr)) |
| 5772 | err = PTR_ERR(ptr); | 5772 | err = PTR_ERR(ptr); |
diff --git a/drivers/usb/gadget/function/f_mass_storage.c b/drivers/usb/gadget/function/f_mass_storage.c index 3cc109f3c9c8..d2259c663996 100644 --- a/drivers/usb/gadget/function/f_mass_storage.c +++ b/drivers/usb/gadget/function/f_mass_storage.c | |||
| @@ -2936,7 +2936,7 @@ int fsg_common_create_lun(struct fsg_common *common, struct fsg_lun_config *cfg, | |||
| 2936 | if (fsg_lun_is_open(lun)) { | 2936 | if (fsg_lun_is_open(lun)) { |
| 2937 | p = "(error)"; | 2937 | p = "(error)"; |
| 2938 | if (pathbuf) { | 2938 | if (pathbuf) { |
| 2939 | p = d_path(&lun->filp->f_path, pathbuf, PATH_MAX); | 2939 | p = file_path(lun->filp, pathbuf, PATH_MAX); |
| 2940 | if (IS_ERR(p)) | 2940 | if (IS_ERR(p)) |
| 2941 | p = "(error)"; | 2941 | p = "(error)"; |
| 2942 | } | 2942 | } |
diff --git a/drivers/usb/gadget/function/storage_common.c b/drivers/usb/gadget/function/storage_common.c index 648f9e489b39..d62683017cf3 100644 --- a/drivers/usb/gadget/function/storage_common.c +++ b/drivers/usb/gadget/function/storage_common.c | |||
| @@ -341,7 +341,7 @@ ssize_t fsg_show_file(struct fsg_lun *curlun, struct rw_semaphore *filesem, | |||
| 341 | 341 | ||
| 342 | down_read(filesem); | 342 | down_read(filesem); |
| 343 | if (fsg_lun_is_open(curlun)) { /* Get the complete pathname */ | 343 | if (fsg_lun_is_open(curlun)) { /* Get the complete pathname */ |
| 344 | p = d_path(&curlun->filp->f_path, buf, PAGE_SIZE - 1); | 344 | p = file_path(curlun->filp, buf, PAGE_SIZE - 1); |
| 345 | if (IS_ERR(p)) | 345 | if (IS_ERR(p)) |
| 346 | rc = PTR_ERR(p); | 346 | rc = PTR_ERR(p); |
| 347 | else { | 347 | else { |
