* [dhowells-fs:cifs-netfs 43/53] fs/smb/client/smb2ops.c:3720:26: sparse: sparse: incorrect type in assignment (different base types)
@ 2023-12-30 2:54 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-12-30 2:54 UTC (permalink / raw)
To: David Howells; +Cc: oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git cifs-netfs
head: 3313e9acb08768eab87d882d830857ebb9907ba1
commit: fe6648ebcd0802759277ca7cd32fe8d3560da0cf [43/53] cifs: Share server EOF pos with netfslib
config: i386-randconfig-061-20231229 (https://download.01.org/0day-ci/archive/20231230/202312301040.13P433Mx-lkp@intel.com/config)
compiler: ClangBuiltLinux clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231230/202312301040.13P433Mx-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312301040.13P433Mx-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
fs/smb/client/smb2ops.c:3718:33: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected long long [usertype] newsize @@ got restricted __le64 [addressable] [assigned] [usertype] eof @@
fs/smb/client/smb2ops.c:3718:33: sparse: expected long long [usertype] newsize
fs/smb/client/smb2ops.c:3718:33: sparse: got restricted __le64 [addressable] [assigned] [usertype] eof
fs/smb/client/smb2ops.c:3719:42: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected long long [usertype] new_i_size @@ got restricted __le64 [addressable] [assigned] [usertype] eof @@
fs/smb/client/smb2ops.c:3719:42: sparse: expected long long [usertype] new_i_size
fs/smb/client/smb2ops.c:3719:42: sparse: got restricted __le64 [addressable] [assigned] [usertype] eof
>> fs/smb/client/smb2ops.c:3720:26: sparse: sparse: incorrect type in assignment (different base types) @@ expected long long [usertype] zero_point @@ got restricted __le64 [addressable] [assigned] [usertype] eof @@
fs/smb/client/smb2ops.c:3720:26: sparse: expected long long [usertype] zero_point
fs/smb/client/smb2ops.c:3720:26: sparse: got restricted __le64 [addressable] [assigned] [usertype] eof
fs/smb/client/smb2ops.c:3721:57: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected long long [usertype] new_size @@ got restricted __le64 [addressable] [assigned] [usertype] eof @@
fs/smb/client/smb2ops.c:3721:57: sparse: expected long long [usertype] new_size
fs/smb/client/smb2ops.c:3721:57: sparse: got restricted __le64 [addressable] [assigned] [usertype] eof
fs/smb/client/smb2ops.c: note: in included file (through include/linux/preempt.h, include/linux/spinlock.h, include/linux/mmzone.h, ...):
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
vim +3720 fs/smb/client/smb2ops.c
3673
3674 static long smb3_collapse_range(struct file *file, struct cifs_tcon *tcon,
3675 loff_t off, loff_t len)
3676 {
3677 int rc;
3678 unsigned int xid;
3679 struct inode *inode = file_inode(file);
3680 struct cifsInodeInfo *cifsi = CIFS_I(inode);
3681 struct cifsFileInfo *cfile = file->private_data;
3682 struct netfs_inode *ictx = &cifsi->netfs;
3683 __le64 eof;
3684 loff_t old_eof;
3685
3686 xid = get_xid();
3687
3688 inode_lock(inode);
3689
3690 old_eof = i_size_read(inode);
3691 if ((off >= old_eof) ||
3692 off + len >= old_eof) {
3693 rc = -EINVAL;
3694 goto out;
3695 }
3696
3697 filemap_invalidate_lock(inode->i_mapping);
3698 rc = filemap_write_and_wait_range(inode->i_mapping, off, old_eof - 1);
3699 if (rc < 0)
3700 goto out_2;
3701
3702 truncate_pagecache_range(inode, off, old_eof);
3703 ictx->zero_point = old_eof;
3704
3705 rc = smb2_copychunk_range(xid, cfile, cfile, off + len,
3706 old_eof - off - len, off);
3707 if (rc < 0)
3708 goto out_2;
3709
3710 eof = cpu_to_le64(old_eof - len);
3711 rc = SMB2_set_eof(xid, tcon, cfile->fid.persistent_fid,
3712 cfile->fid.volatile_fid, cfile->pid, &eof);
3713 if (rc < 0)
3714 goto out_2;
3715
3716 rc = 0;
3717
3718 truncate_setsize(inode, eof);
3719 netfs_resize_file(&cifsi->netfs, eof, true);
> 3720 ictx->zero_point = eof;
3721 fscache_resize_cookie(cifs_inode_cookie(inode), eof);
3722 out_2:
3723 filemap_invalidate_unlock(inode->i_mapping);
3724 out:
3725 inode_unlock(inode);
3726 free_xid(xid);
3727 return rc;
3728 }
3729
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-12-30 2:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-30 2:54 [dhowells-fs:cifs-netfs 43/53] fs/smb/client/smb2ops.c:3720:26: sparse: sparse: incorrect type in assignment (different base types) kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.