[cifs:for-next 8/30] fs//cifs/inode.c:2083:18: note: in expansion of macro 'min'
kbuild test robot
lkp at intel.com
Thu Feb 21 05:11:50 UTC 2019
tree: git://git.samba.org/sfrench/cifs-2.6.git for-next
head: cf8240472c0309ba65b80b47455d63a5266cca57
commit: 23789e020beda17818c09b382e746da2f17a767c [8/30] smb3: make default i/o size for smb3 mounts larger
config: nds32-allyesconfig (attached as .config)
compiler: nds32le-linux-gcc (GCC) 6.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 23789e020beda17818c09b382e746da2f17a767c
# save the attached .config to linux build tree
GCC_VERSION=6.4.0 make.cross ARCH=nds32
All warnings (new ones prefixed by >>):
In file included from include/linux/list.h:9:0,
from include/linux/wait.h:7,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from fs//cifs/inode.c:21:
fs//cifs/inode.c: In function 'cifs_getattr':
include/linux/kernel.h:846:29: warning: comparison of distinct pointer types lacks a cast
(!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
^
include/linux/kernel.h:860:4: note: in expansion of macro '__typecheck'
(__typecheck(x, y) && __no_side_effects(x, y))
^~~~~~~~~~~
include/linux/kernel.h:870:24: note: in expansion of macro '__safe_cmp'
__builtin_choose_expr(__safe_cmp(x, y), \
^~~~~~~~~~
include/linux/kernel.h:879:19: note: in expansion of macro '__careful_cmp'
#define min(x, y) __careful_cmp(x, y, <)
^~~~~~~~~~~~~
>> fs//cifs/inode.c:2083:18: note: in expansion of macro 'min'
stat->blksize = min(2097152 /* 2MB */, cifs_sb->rsize);
^~~
vim +/min +2083 fs//cifs/inode.c
2055
2056 int cifs_getattr(const struct path *path, struct kstat *stat,
2057 u32 request_mask, unsigned int flags)
2058 {
2059 struct dentry *dentry = path->dentry;
2060 struct cifs_sb_info *cifs_sb = CIFS_SB(dentry->d_sb);
2061 struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb);
2062 struct inode *inode = d_inode(dentry);
2063 int rc;
2064
2065 /*
2066 * We need to be sure that all dirty pages are written and the server
2067 * has actual ctime, mtime and file length.
2068 */
2069 if (!CIFS_CACHE_READ(CIFS_I(inode)) && inode->i_mapping &&
2070 inode->i_mapping->nrpages != 0) {
2071 rc = filemap_fdatawait(inode->i_mapping);
2072 if (rc) {
2073 mapping_set_error(inode->i_mapping, rc);
2074 return rc;
2075 }
2076 }
2077
2078 rc = cifs_revalidate_dentry_attr(dentry);
2079 if (rc)
2080 return rc;
2081
2082 generic_fillattr(inode, stat);
> 2083 stat->blksize = min(2097152 /* 2MB */, cifs_sb->rsize);
2084 stat->ino = CIFS_I(inode)->uniqueid;
2085
2086 /* old CIFS Unix Extensions doesn't return create time */
2087 if (CIFS_I(inode)->createtime) {
2088 stat->result_mask |= STATX_BTIME;
2089 stat->btime =
2090 cifs_NTtimeToUnix(cpu_to_le64(CIFS_I(inode)->createtime));
2091 }
2092
2093 stat->attributes_mask |= (STATX_ATTR_COMPRESSED | STATX_ATTR_ENCRYPTED);
2094 if (CIFS_I(inode)->cifsAttrs & FILE_ATTRIBUTE_COMPRESSED)
2095 stat->attributes |= STATX_ATTR_COMPRESSED;
2096 if (CIFS_I(inode)->cifsAttrs & FILE_ATTRIBUTE_ENCRYPTED)
2097 stat->attributes |= STATX_ATTR_ENCRYPTED;
2098
2099 /*
2100 * If on a multiuser mount without unix extensions or cifsacl being
2101 * enabled, and the admin hasn't overridden them, set the ownership
2102 * to the fsuid/fsgid of the current process.
2103 */
2104 if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MULTIUSER) &&
2105 !(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) &&
2106 !tcon->unix_ext) {
2107 if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_UID))
2108 stat->uid = current_fsuid();
2109 if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_GID))
2110 stat->gid = current_fsgid();
2111 }
2112 return rc;
2113 }
2114
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 49915 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20190221/ed412e2b/config.gz>
More information about the samba-technical
mailing list