From: kernel test robot <lkp@intel.com>
To: Jeff Layton <jlayton@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
Christian Brauner <brauner@kernel.org>, NeilBrown <neilb@suse.de>
Subject: [linux-next:master 4030/4465] fs/ceph/locks.c:379:27: warning: unused variable 'lock'
Date: Tue, 6 Feb 2024 22:31:46 +0800 [thread overview]
Message-ID: <202402062210.3YyBVGF1-lkp@intel.com> (raw)
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
reply other threads:[~2024-02-06 14:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202402062210.3YyBVGF1-lkp@intel.com \
--to=lkp@intel.com \
--cc=brauner@kernel.org \
--cc=jlayton@kernel.org \
--cc=linux-mm@kvack.org \
--cc=neilb@suse.de \
--cc=oe-kbuild-all@lists.linux.dev \
/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