diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-07-04 22:36:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-07-04 22:36:06 -0400 |
commit | 1dc51b8288007753ad7cd7d08bb8fa930fc8bb10 (patch) | |
tree | 0616c0ff7d877e64d9c248a6cdff074eae258840 /drivers/block | |
parent | 9b284cbdb5de3b8871014f8290d1b540e5181c21 (diff) | |
parent | 0f1db7dee200127da4c07928189748918c312031 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull more vfs updates from Al Viro:
"Assorted VFS fixes and related cleanups (IMO the most interesting in
that part are f_path-related things and Eric's descriptor-related
stuff). UFS regression fixes (it got broken last cycle). 9P fixes.
fs-cache series, DAX patches, Jan's file_remove_suid() work"
[ I'd say this is much more than "fixes and related cleanups". The
file_table locking rule change by Eric Dumazet is a rather big and
fundamental update even if the patch isn't huge. - Linus ]
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (49 commits)
9p: cope with bogus responses from server in p9_client_{read,write}
p9_client_write(): avoid double p9_free_req()
9p: forgetting to cancel request on interrupted zero-copy RPC
dax: bdev_direct_access() may sleep
block: Add support for DAX reads/writes to block devices
dax: Use copy_from_iter_nocache
dax: Add block size note to documentation
fs/file.c: __fget() and dup2() atomicity rules
fs/file.c: don't acquire files->file_lock in fd_install()
fs:super:get_anon_bdev: fix race condition could cause dev exceed its upper limitation
vfs: avoid creation of inode number 0 in get_next_ino
namei: make set_root_rcu() return void
make simple_positive() public
ufs: use dir_pages instead of ufs_dir_pages()
pagemap.h: move dir_pages() over there
remove the pointless include of lglock.h
fs: cleanup slight list_entry abuse
xfs: Correctly lock inode when removing suid and file capabilities
fs: Call security_ops->inode_killpriv on truncate
fs: Provide function telling whether file_remove_privs() will do anything
...
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/drbd/drbd_debugfs.c | 10 | ||||
-rw-r--r-- | drivers/block/loop.c | 2 |
2 files changed, 2 insertions, 10 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)) |