Hi Christian,
I love your patch! Perhaps something to improve:
[auto build test WARNING on 456af438ad490bac7ed954cb929bcec1df7f0c82]
url:
https://github.com/0day-ci/linux/commits/Christian-Brauner/ksmbd-fix-look...
base: 456af438ad490bac7ed954cb929bcec1df7f0c82
config: s390-allyesconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
#
https://github.com/0day-ci/linux/commit/ebbc41b9d3f7b7f6c558cb5d5f12ecb81...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Christian-Brauner/ksmbd-fix-lookup-on-idmapped-mounts/20210816-200054
git checkout ebbc41b9d3f7b7f6c558cb5d5f12ecb8134c9c2e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
fs/ksmbd/vfs.c: In function 'ksmbd_vfs_lock_parent':
fs/ksmbd/vfs.c:79:18: error: implicit declaration of function 'lookup_one'; did
you mean 'lookup_bdev'? [-Werror=implicit-function-declaration]
79 | dentry = lookup_one(user_ns, child->d_name.name, parent,
| ^~~~~~~~~~
| lookup_bdev
> fs/ksmbd/vfs.c:79:16: warning: assignment to 'struct dentry
*' from 'int' makes pointer from integer without a cast [-Wint-conversion]
79 | dentry = lookup_one(user_ns, child->d_name.name, parent,
| ^
fs/ksmbd/vfs.c: In function 'ksmbd_vfs_mkdir':
fs/ksmbd/vfs.c:223:19: warning: assignment to 'struct dentry *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
223 | d = lookup_one(user_ns, dentry->d_name.name,
dentry->d_parent,
| ^
fs/ksmbd/vfs.c: In function '__ksmbd_vfs_rename':
fs/ksmbd/vfs.c:753:18: warning: assignment to 'struct dentry *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
753 | dst_dent = lookup_one(dst_user_ns, dst_name, dst_dent_parent,
| ^
fs/ksmbd/vfs.c: In function 'ksmbd_vfs_fp_rename':
fs/ksmbd/vfs.c:816:19: warning: assignment to 'struct dentry *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
816 | src_child = lookup_one(user_ns, src_dent->d_name.name,
src_dent_parent,
| ^
cc1: some warnings being treated as errors
--
fs/ksmbd/smb2pdu.c: In function 'process_query_dir_entries':
fs/ksmbd/smb2pdu.c:3542:24: error: implicit declaration of function
'lookup_one'; did you mean 'lookup_bdev'?
[-Werror=implicit-function-declaration]
3542 | dent = lookup_one(user_ns, priv->d_info->name,
| ^~~~~~~~~~
| lookup_bdev
> fs/ksmbd/smb2pdu.c:3542:22: warning: assignment to 'struct
dentry *' from 'int' makes pointer from integer without a cast
[-Wint-conversion]
3542 | dent = lookup_one(user_ns,
priv->d_info->name,
| ^
cc1: some warnings being treated as errors
vim +79 fs/ksmbd/vfs.c
62
63 /**
64 * ksmbd_vfs_lock_parent() - lock parent dentry if it is stable
65 *
66 * the parent dentry got by dget_parent or @parent could be
67 * unstable, we try to lock a parent inode and lookup the
68 * child dentry again.
69 *
70 * the reference count of @parent isn't incremented.
71 */
72 int ksmbd_vfs_lock_parent(struct user_namespace *user_ns, struct dentry *parent,
73 struct dentry *child)
74 {
75 struct dentry *dentry;
76 int ret = 0;
77
78 inode_lock_nested(d_inode(parent), I_MUTEX_PARENT);
79 dentry = lookup_one(user_ns, child->d_name.name, parent,
80 child->d_name.len);
81 if (IS_ERR(dentry)) {
82 ret = PTR_ERR(dentry);
83 goto out_err;
84 }
85
86 if (dentry != child) {
87 ret = -ESTALE;
88 dput(dentry);
89 goto out_err;
90 }
91
92 dput(dentry);
93 return 0;
94 out_err:
95 inode_unlock(d_inode(parent));
96 return ret;
97 }
98
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org