* [linux-next:master 4030/4465] fs/ceph/locks.c:379:27: warning: unused variable 'lock'
@ 2024-02-06 14:31 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-02-06 14:31 UTC (permalink / raw)
To: Jeff Layton
Cc: oe-kbuild-all, Linux Memory Management List, Christian Brauner,
NeilBrown
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: ac139fc7db67968e5061715508b5fc4aa7c40c56
commit: 75e9570c93c70e8ad7be59cce82cea3872d8e8a7 [4030/4465] ceph: convert to using new filelock helpers
config: arm-randconfig-r071-20240206 (https://download.01.org/0day-ci/archive/20240206/202402062210.3YyBVGF1-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240206/202402062210.3YyBVGF1-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/202402062210.3YyBVGF1-lkp@intel.com/
All warnings (new ones prefixed by >>):
fs/ceph/locks.c: In function 'ceph_count_locks':
>> fs/ceph/locks.c:379:27: warning: unused variable 'lock' [-Wunused-variable]
379 | struct file_lock *lock;
| ^~~~
vim +/lock +379 fs/ceph/locks.c
40819f6fb227c1 Greg Farnum 2010-08-02 371
5263e31e452fb8 Jeff Layton 2015-01-16 372 /*
5263e31e452fb8 Jeff Layton 2015-01-16 373 * Fills in the passed counter variables, so you can prepare pagelist metadata
5263e31e452fb8 Jeff Layton 2015-01-16 374 * before calling ceph_encode_locks.
40819f6fb227c1 Greg Farnum 2010-08-02 375 */
40819f6fb227c1 Greg Farnum 2010-08-02 376 void ceph_count_locks(struct inode *inode, int *fcntl_count, int *flock_count)
40819f6fb227c1 Greg Farnum 2010-08-02 377 {
38d46409c4639a Xiubo Li 2023-06-12 378 struct ceph_client *cl = ceph_inode_to_client(inode);
e084c1bd409269 Jeff Layton 2015-02-16 @379 struct file_lock *lock;
5263e31e452fb8 Jeff Layton 2015-01-16 380 struct file_lock_context *ctx;
40819f6fb227c1 Greg Farnum 2010-08-02 381
40819f6fb227c1 Greg Farnum 2010-08-02 382 *fcntl_count = 0;
40819f6fb227c1 Greg Farnum 2010-08-02 383 *flock_count = 0;
40819f6fb227c1 Greg Farnum 2010-08-02 384
d4e78663f6bc83 Jeff Layton 2022-11-16 385 ctx = locks_inode_context(inode);
5263e31e452fb8 Jeff Layton 2015-01-16 386 if (ctx) {
e084c1bd409269 Jeff Layton 2015-02-16 387 spin_lock(&ctx->flc_lock);
75e9570c93c70e Jeff Layton 2024-01-31 388 for_each_file_lock(lock, &ctx->flc_posix)
e084c1bd409269 Jeff Layton 2015-02-16 389 ++(*fcntl_count);
75e9570c93c70e Jeff Layton 2024-01-31 390 for_each_file_lock(lock, &ctx->flc_flock)
e084c1bd409269 Jeff Layton 2015-02-16 391 ++(*flock_count);
e084c1bd409269 Jeff Layton 2015-02-16 392 spin_unlock(&ctx->flc_lock);
bd61e0a9c852de Jeff Layton 2015-01-16 393 }
38d46409c4639a Xiubo Li 2023-06-12 394 doutc(cl, "counted %d flock locks and %d fcntl locks\n",
40819f6fb227c1 Greg Farnum 2010-08-02 395 *flock_count, *fcntl_count);
40819f6fb227c1 Greg Farnum 2010-08-02 396 }
40819f6fb227c1 Greg Farnum 2010-08-02 397
:::::: The code at line 379 was first introduced by commit
:::::: e084c1bd40926938ff8d26af3bde34396dd4d06d Revert "locks: keep a count of locks on the flctx lists"
:::::: TO: Jeff Layton <jeff.layton@primarydata.com>
:::::: CC: Jeff Layton <jeff.layton@primarydata.com>
--
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:[~2024-02-06 14:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-06 14:31 [linux-next:master 4030/4465] fs/ceph/locks.c:379:27: warning: unused variable 'lock' kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox