mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
Cc: kbuild-all@01.org, bfields@fieldses.org, jlayton@poochiereds.net,
	viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org, devel@criu.org
Subject: Re: [PATCH] fcntl: allow to set O_DIRECT flag on pipe
Date: Wed, 16 Dec 2015 00:15:05 +0800	[thread overview]
Message-ID: <201512160047.tF7UUWvb%fengguang.wu@intel.com> (raw)
In-Reply-To: <20151215151325.15499.65499.stgit@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 4342 bytes --]

Hi Stanislav,

[auto build test WARNING on v4.4-rc5]
[also build test WARNING on next-20151215]

url:    https://github.com/0day-ci/linux/commits/Stanislav-Kinsburskiy/fcntl-allow-to-set-O_DIRECT-flag-on-pipe/20151216-000234
config: i386-randconfig-x009-12141102 (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/syscalls.h:70,
                    from fs/fcntl.c:7:
   fs/fcntl.c: In function 'setfl':
   fs/fcntl.c:55:7: error: implicit declaration of function 'IS_FIFO' [-Werror=implicit-function-declaration]
     if (!IS_FIFO(f->f_mode) && (arg & O_DIRECT)) {
          ^
   include/linux/compiler.h:147:28: note: in definition of macro '__trace_if'
     if (__builtin_constant_p((cond)) ? !!(cond) :   \
                               ^
>> fs/fcntl.c:55:2: note: in expansion of macro 'if'
     if (!IS_FIFO(f->f_mode) && (arg & O_DIRECT)) {
     ^
   fs/fcntl.c:55:15: error: 'f' undeclared (first use in this function)
     if (!IS_FIFO(f->f_mode) && (arg & O_DIRECT)) {
                  ^
   include/linux/compiler.h:147:28: note: in definition of macro '__trace_if'
     if (__builtin_constant_p((cond)) ? !!(cond) :   \
                               ^
>> fs/fcntl.c:55:2: note: in expansion of macro 'if'
     if (!IS_FIFO(f->f_mode) && (arg & O_DIRECT)) {
     ^
   fs/fcntl.c:55:15: note: each undeclared identifier is reported only once for each function it appears in
     if (!IS_FIFO(f->f_mode) && (arg & O_DIRECT)) {
                  ^
   include/linux/compiler.h:147:28: note: in definition of macro '__trace_if'
     if (__builtin_constant_p((cond)) ? !!(cond) :   \
                               ^
>> fs/fcntl.c:55:2: note: in expansion of macro 'if'
     if (!IS_FIFO(f->f_mode) && (arg & O_DIRECT)) {
     ^
   cc1: some warnings being treated as errors

vim +/if +55 fs/fcntl.c

     1	/*
     2	 *  linux/fs/fcntl.c
     3	 *
     4	 *  Copyright (C) 1991, 1992  Linus Torvalds
     5	 */
     6	
   > 7	#include <linux/syscalls.h>
     8	#include <linux/init.h>
     9	#include <linux/mm.h>
    10	#include <linux/fs.h>
    11	#include <linux/file.h>
    12	#include <linux/fdtable.h>
    13	#include <linux/capability.h>
    14	#include <linux/dnotify.h>
    15	#include <linux/slab.h>
    16	#include <linux/module.h>
    17	#include <linux/pipe_fs_i.h>
    18	#include <linux/security.h>
    19	#include <linux/ptrace.h>
    20	#include <linux/signal.h>
    21	#include <linux/rcupdate.h>
    22	#include <linux/pid_namespace.h>
    23	#include <linux/user_namespace.h>
    24	#include <linux/shmem_fs.h>
    25	
    26	#include <asm/poll.h>
    27	#include <asm/siginfo.h>
    28	#include <asm/uaccess.h>
    29	
    30	#define SETFL_MASK (O_APPEND | O_NONBLOCK | O_NDELAY | O_DIRECT | O_NOATIME)
    31	
    32	static int setfl(int fd, struct file * filp, unsigned long arg)
    33	{
    34		struct inode * inode = file_inode(filp);
    35		int error = 0;
    36	
    37		/*
    38		 * O_APPEND cannot be cleared if the file is marked as append-only
    39		 * and the file is open for write.
    40		 */
    41		if (((arg ^ filp->f_flags) & O_APPEND) && IS_APPEND(inode))
    42			return -EPERM;
    43	
    44		/* O_NOATIME can only be set by the owner or superuser */
    45		if ((arg & O_NOATIME) && !(filp->f_flags & O_NOATIME))
    46			if (!inode_owner_or_capable(inode))
    47				return -EPERM;
    48	
    49		/* required for strict SunOS emulation */
    50		if (O_NONBLOCK != O_NDELAY)
    51		       if (arg & O_NDELAY)
    52			   arg |= O_NONBLOCK;
    53	
    54		/* Pipe packetized mode is controlled by O_DIRECT flag */
  > 55		if (!IS_FIFO(f->f_mode) && (arg & O_DIRECT)) {
    56			if (!filp->f_mapping || !filp->f_mapping->a_ops ||
    57				!filp->f_mapping->a_ops->direct_IO)
    58					return -EINVAL;

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 23229 bytes --]

      parent reply	other threads:[~2015-12-15 16:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-15 15:14 Stanislav Kinsburskiy
2015-12-15 16:14 ` kbuild test robot
2015-12-15 16:15 ` kbuild test robot [this message]

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=201512160047.tF7UUWvb%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=bfields@fieldses.org \
    --cc=devel@criu.org \
    --cc=jlayton@poochiereds.net \
    --cc=kbuild-all@01.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=skinsbursky@virtuozzo.com \
    --cc=viro@zeniv.linux.org.uk \
    /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

all inboxes | Powered by JetHome®