[vfs:work.const-path 3/18] fs/open.c:107:34: warning: passing argument 1 of 'security_path_truncate' discards 'const' qualifier from pointer target type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git work.const-path
head:   0e46f2346cbf0427af8f1391f8a40c8283104738
commit: d181c64817a4c866a6ee518b145cceb24a99ca19 [3/18] constify vfs_truncate()
config: x86_64-randconfig-x010-201613 (attached as .config)
reproduce:
        git checkout d181c64817a4c866a6ee518b145cceb24a99ca19
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   fs/open.c: In function 'vfs_truncate':
>> fs/open.c:107:34: warning: passing argument 1 of 'security_path_truncate' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
      error = security_path_truncate(path);
                                     ^
   In file included from fs/open.c:18:0:
   include/linux/security.h:1484:19: note: expected 'struct path *' but argument is of type 'const struct path *'
    static inline int security_path_truncate(struct path *path)
                      ^

vim +107 fs/open.c

9ac9b847 Dave Hansen       2008-02-15   91  		goto mnt_drop_write_and_out;
^1da177e Linus Torvalds    2005-04-16   92  
9700382c david m. richter  2007-07-31   93  	error = get_write_access(inode);
^1da177e Linus Torvalds    2005-04-16   94  	if (error)
9ac9b847 Dave Hansen       2008-02-15   95  		goto mnt_drop_write_and_out;
^1da177e Linus Torvalds    2005-04-16   96  
9700382c david m. richter  2007-07-31   97  	/*
9700382c david m. richter  2007-07-31   98  	 * Make sure that there are no leases.  get_write_access() protects
9700382c david m. richter  2007-07-31   99  	 * against the truncate racing with a lease-granting setlease().
9700382c david m. richter  2007-07-31  100  	 */
8737c930 Al Viro           2009-12-24  101  	error = break_lease(inode, O_WRONLY);
^1da177e Linus Torvalds    2005-04-16  102  	if (error)
9700382c david m. richter  2007-07-31  103  		goto put_write_and_out;
^1da177e Linus Torvalds    2005-04-16  104  
^1da177e Linus Torvalds    2005-04-16  105  	error = locks_verify_truncate(inode, NULL, length);
be6d3e56 Kentaro Takeda    2008-12-17  106  	if (!error)
a02de960 David Howells     2012-12-20 @107  		error = security_path_truncate(path);
907f4554 Christoph Hellwig 2010-03-03  108  	if (!error)
a02de960 David Howells     2012-12-20  109  		error = do_truncate(path->dentry, length, 0, NULL);
^1da177e Linus Torvalds    2005-04-16  110  
9700382c david m. richter  2007-07-31  111  put_write_and_out:
9700382c david m. richter  2007-07-31  112  	put_write_access(inode);
9ac9b847 Dave Hansen       2008-02-15  113  mnt_drop_write_and_out:
a02de960 David Howells     2012-12-20  114  	mnt_drop_write(path->mnt);
^1da177e Linus Torvalds    2005-04-16  115  out:

:::::: The code at line 107 was first introduced by commit
:::::: a02de9608595c8ef649ef03ae735b0b45e3d4396 VFS: Make more complete truncate operation available to CacheFiles

:::::: TO: David Howells <dhowells@xxxxxxxxxx>
:::::: CC: David Howells <dhowells@xxxxxxxxxx>

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

Attachment: .config.gz
Description: Binary data


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux