lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 3 Aug 2018 17:51:12 +0100 From: Al Viro <viro@...IV.linux.org.uk> To: linux-fsdevel@...r.kernel.org Cc: linux-kernel@...r.kernel.org Subject: [PATCH 2/5] afs: switch dynroot lookups to d_splice_alias() From: Al Viro <viro@...iv.linux.org.uk> Signed-off-by: Al Viro <viro@...iv.linux.org.uk> --- fs/afs/dynroot.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/fs/afs/dynroot.c b/fs/afs/dynroot.c index 174e843f0633..40fea59067b3 100644 --- a/fs/afs/dynroot.c +++ b/fs/afs/dynroot.c @@ -143,7 +143,6 @@ static struct dentry *afs_dynroot_lookup(struct inode *dir, struct dentry *dentr { struct afs_vnode *vnode; struct inode *inode; - int ret; vnode = AFS_FS_I(dir); @@ -161,21 +160,10 @@ static struct dentry *afs_dynroot_lookup(struct inode *dir, struct dentry *dentr return afs_lookup_atcell(dentry); inode = afs_try_auto_mntpt(dentry, dir); - if (IS_ERR(inode)) { - ret = PTR_ERR(inode); - if (ret == -ENOENT) { - d_add(dentry, NULL); - _leave(" = NULL [negative]"); - return NULL; - } - _leave(" = %d [do]", ret); - return ERR_PTR(ret); - } + if (inode == ERR_PTR(-ENOENT)) + inode = NULL; - d_add(dentry, inode); - _leave(" = 0 { ino=%lu v=%u }", - d_inode(dentry)->i_ino, d_inode(dentry)->i_generation); - return NULL; + return d_splice_alias(inode, dentry); } const struct inode_operations afs_dynroot_inode_operations = { -- 2.11.0
Powered by blists - more mailing lists