Re: [PATCH 4/4] block_dev: support RFW_NOWAIT on block device nodes
From: kbuild test robot <hidden>
Date: 2017-07-07 20:18:27
Also in:
linux-fsdevel
Hi Christoph, [auto build test WARNING on linus/master] [also build test WARNING on next-20170707] [cannot apply to v4.12] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Christoph-Hellwig/fs-pass-iocb-to-do_generic_file_read/20170708-020747 config: x86_64-randconfig-x012-201727 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All warnings (new ones prefixed by >>): In file included from include/linux/init.h:4:0, from fs/block_dev.c:8: fs/block_dev.c: In function 'blkdev_write_iter': fs/block_dev.c:1895:21: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses] if (iocb->ki_flags & (IOCB_NOWAIT | IOCB_DIRECT) == IOCB_NOWAIT) ^ include/linux/compiler.h:156:30: note: in definition of macro '__trace_if' if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ^~~~
quoted
fs/block_dev.c:1895:2: note: in expansion of macro 'if'
if (iocb->ki_flags & (IOCB_NOWAIT | IOCB_DIRECT) == IOCB_NOWAIT)
^~
fs/block_dev.c:1895:21: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
if (iocb->ki_flags & (IOCB_NOWAIT | IOCB_DIRECT) == IOCB_NOWAIT)
^
include/linux/compiler.h:156:42: note: in definition of macro '__trace_if'
if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
^~~~quoted
fs/block_dev.c:1895:2: note: in expansion of macro 'if'
if (iocb->ki_flags & (IOCB_NOWAIT | IOCB_DIRECT) == IOCB_NOWAIT)
^~
fs/block_dev.c:1895:21: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
if (iocb->ki_flags & (IOCB_NOWAIT | IOCB_DIRECT) == IOCB_NOWAIT)
^
include/linux/compiler.h:167:16: note: in definition of macro '__trace_if'
______r = !!(cond); \
^~~~quoted
fs/block_dev.c:1895:2: note: in expansion of macro 'if'
if (iocb->ki_flags & (IOCB_NOWAIT | IOCB_DIRECT) == IOCB_NOWAIT)
^~
vim +/if +1895 fs/block_dev.c
1879 {
1880 struct file *file = iocb->ki_filp;
1881 struct inode *bd_inode = bdev_file_inode(file);
1882 loff_t size = i_size_read(bd_inode);
1883 struct blk_plug plug;
1884 ssize_t ret;
1885
1886 if (bdev_read_only(I_BDEV(bd_inode)))
1887 return -EPERM;
1888
1889 if (!iov_iter_count(from))
1890 return 0;
1891
1892 if (iocb->ki_pos >= size)
1893 return -ENOSPC;
1894 1895 if (iocb->ki_flags & (IOCB_NOWAIT | IOCB_DIRECT) == IOCB_NOWAIT)
1896 return -EOPNOTSUPP; 1897 1898 iov_iter_truncate(from, size - iocb->ki_pos); 1899 1900 blk_start_plug(&plug); 1901 ret = __generic_file_write_iter(iocb, from); 1902 if (ret > 0) 1903 ret = generic_write_sync(iocb, ret); --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachments
- .config.gz [application/gzip] 30073 bytes