From: kbuild test robot <lkp@intel.com>
To: Chao Yu <yuchao0@huawei.com>
Cc: chao@kernel.org, linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net, kbuild-all@01.org,
jaegeuk@kernel.org
Subject: Re: [PATCH] f2fs: don't allow volatile writes for non-regular file
Date: Mon, 20 Mar 2017 00:00:33 +0800 [thread overview]
Message-ID: <201703192340.5NOXcZia%fengguang.wu@intel.com> (raw)
In-Reply-To: <20170317033217.5371-1-yuchao0@huawei.com>
Hi Chao,
[auto build test WARNING on f2fs/dev]
[also build test WARNING on v4.11-rc2 next-20170310]
[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/Chao-Yu/f2fs-don-t-allow-volatile-writes-for-non-regular-file/20170319-221605
base: https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__
sparse warnings: (new ones prefixed by >>)
include/linux/compiler.h:264:8: sparse: attribute 'no_sanitize_address': unknown attribute
>> fs/f2fs/file.c:1598:14: sparse: incompatible types for operation (&)
fs/f2fs/file.c:1598:14: left side has type struct inode *inode
fs/f2fs/file.c:1598:14: right side has type int
fs/f2fs/file.c:1598:14: sparse: incompatible types for operation (==)
fs/f2fs/file.c:1598:14: left side has type bad type
fs/f2fs/file.c:1598:14: right side has type int
In file included from include/linux/stat.h:6:0,
from include/linux/fs.h:9,
from fs/f2fs/file.c:11:
fs/f2fs/file.c: In function 'f2fs_ioc_start_volatile_write':
include/uapi/linux/stat.h:20:26: error: invalid operands to binary & (have 'struct inode *' and 'int')
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
^
fs/f2fs/file.c:1598:7: note: in expansion of macro 'S_ISREG'
if (!S_ISREG(inode))
^~~~~~~
vim +1598 fs/f2fs/file.c
1582 ret = f2fs_do_sync_file(filp, 0, LLONG_MAX, 0, true);
1583 }
1584 err_out:
1585 inode_unlock(inode);
1586 mnt_drop_write_file(filp);
1587 return ret;
1588 }
1589
1590 static int f2fs_ioc_start_volatile_write(struct file *filp)
1591 {
1592 struct inode *inode = file_inode(filp);
1593 int ret;
1594
1595 if (!inode_owner_or_capable(inode))
1596 return -EACCES;
1597
> 1598 if (!S_ISREG(inode))
1599 return -EINVAL;
1600
1601 ret = mnt_want_write_file(filp);
1602 if (ret)
1603 return ret;
1604
1605 inode_lock(inode);
1606
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
next prev parent reply other threads:[~2017-03-19 16:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-17 3:32 [PATCH] f2fs: don't allow volatile writes for non-regular file Chao Yu
2017-03-19 16:00 ` kbuild test robot [this message]
2017-03-20 10:56 ` Chao Yu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201703192340.5NOXcZia%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=chao@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=kbuild-all@01.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=yuchao0@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).