From: Thierry Reding Date: Thu, 24 Oct 2013 13:02:30 +0000 (+0200) Subject: Merge remote-tracking branch 'userns/for-next' X-Git-Tag: next-20131024~15 X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-linux.git;a=commitdiff_plain;h=25691330eb62649401cfb18ef518983511f6412f Merge remote-tracking branch 'userns/for-next' Conflicts: fs/fuse/dir.c --- 25691330eb62649401cfb18ef518983511f6412f diff --cc fs/fuse/dir.c index 0747f6eed598,b1cd7b79a325..3959aa981f17 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@@ -263,9 -259,7 +263,10 @@@ out invalid: ret = 0; - shrink_submounts_and_drop(entry); + - if (!(flags & LOOKUP_RCU) && check_submounts_and_drop(entry) != 0) - ret = 1; ++ if (!(flags & LOOKUP_RCU)) ++ shrink_submounts_and_drop(entry); ++ goto out; } diff --cc fs/nfs/dir.c index 76548d81f926,e8e35acd8850..c20fffac621e --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@@ -1128,13 -1142,11 +1128,10 @@@ out_zap_parent if (dentry->d_flags & DCACHE_DISCONNECTED) goto out_valid; } - /* If we have submounts, don't unhash ! */ - if (check_submounts_and_drop(dentry) != 0) - goto out_valid; - + shrink_submounts_and_drop(dentry); dput(parent); - dfprintk(LOOKUPCACHE, "NFS: %s(%s/%s) is invalid\n", - __func__, dentry->d_parent->d_name.name, - dentry->d_name.name); + dfprintk(LOOKUPCACHE, "NFS: %s(%pd2) is invalid\n", + __func__, dentry); return 0; out_error: nfs_free_fattr(fattr); diff --cc fs/sysfs/dir.c index eab59de47556,477c66d4e2a8..11837b73abbf --- a/fs/sysfs/dir.c +++ b/fs/sysfs/dir.c @@@ -311,11 -318,15 +311,10 @@@ static int sysfs_dentry_revalidate(stru goto out_bad; /* The sysfs dirent has been moved to a different namespace */ - type = KOBJ_NS_TYPE_NONE; - if (sd->s_parent) { - type = sysfs_ns_type(sd->s_parent); - if (type != KOBJ_NS_TYPE_NONE && - sysfs_info(dentry->d_sb)->ns[type] != sd->s_ns) - goto out_bad; - } + if (sd->s_ns && sd->s_ns != sysfs_info(dentry->d_sb)->ns) + goto out_bad; mutex_unlock(&sysfs_mutex); - out_valid: return 1; out_bad: /* Remove the dentry from the dcache hashes.