mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
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 ...
This commit is contained in:
@@ -496,16 +496,11 @@ struct dentry *tracefs_create_instance_dir(const char *name, struct dentry *pare
|
||||
return dentry;
|
||||
}
|
||||
|
||||
static inline int tracefs_positive(struct dentry *dentry)
|
||||
{
|
||||
return dentry->d_inode && !d_unhashed(dentry);
|
||||
}
|
||||
|
||||
static int __tracefs_remove(struct dentry *dentry, struct dentry *parent)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (tracefs_positive(dentry)) {
|
||||
if (simple_positive(dentry)) {
|
||||
if (dentry->d_inode) {
|
||||
dget(dentry);
|
||||
switch (dentry->d_inode->i_mode & S_IFMT) {
|
||||
@@ -582,7 +577,7 @@ void tracefs_remove_recursive(struct dentry *dentry)
|
||||
*/
|
||||
spin_lock(&parent->d_lock);
|
||||
list_for_each_entry(child, &parent->d_subdirs, d_child) {
|
||||
if (!tracefs_positive(child))
|
||||
if (!simple_positive(child))
|
||||
continue;
|
||||
|
||||
/* perhaps simple_empty(child) makes more sense */
|
||||
@@ -603,7 +598,7 @@ void tracefs_remove_recursive(struct dentry *dentry)
|
||||
* from d_subdirs. When releasing the parent->d_lock we can
|
||||
* no longer trust that the next pointer is valid.
|
||||
* Restart the loop. We'll skip this one with the
|
||||
* tracefs_positive() check.
|
||||
* simple_positive() check.
|
||||
*/
|
||||
goto loop;
|
||||
}
|
||||
|
Reference in New Issue
Block a user