From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Julia Lawall <julia.lawall@inria.fr>
Subject: fs/ceph/addr.c:1283:10-17: ERROR: PTR_ERR applied after initialization to constant on line 1282
Date: Wed, 30 Apr 2025 09:48:24 +0800 [thread overview]
Message-ID: <202504300933.l6UNPehu-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
CC: Christian Brauner <brauner@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8bac8898fe398ffa3e09075ecea2be511725fb0b
commit: ce80b76dd32764cc914975777e058d4fae4f0ea0 ceph: introduce ceph_process_folio_batch() method
date: 9 weeks ago
:::::: branch date: 4 hours ago
:::::: commit date: 9 weeks ago
config: arc-randconfig-r063-20250430 (https://download.01.org/0day-ci/archive/20250430/202504300933.l6UNPehu-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 12.4.0
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>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202504300933.l6UNPehu-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> fs/ceph/addr.c:1283:10-17: ERROR: PTR_ERR applied after initialization to constant on line 1282
vim +1283 fs/ceph/addr.c
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1254
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1255 static inline
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1256 int ceph_move_dirty_page_in_page_array(struct address_space *mapping,
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1257 struct writeback_control *wbc,
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1258 struct ceph_writeback_ctl *ceph_wbc,
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1259 struct page *page)
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1260 {
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1261 struct inode *inode = mapping->host;
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1262 struct ceph_fs_client *fsc = ceph_inode_to_fs_client(inode);
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1263 struct ceph_client *cl = fsc->client;
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1264 struct page **pages = ceph_wbc->pages;
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1265 unsigned int index = ceph_wbc->locked_pages;
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1266 gfp_t gfp_flags = ceph_wbc->locked_pages ? GFP_NOWAIT : GFP_NOFS;
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1267
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1268 if (IS_ENCRYPTED(inode)) {
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1269 pages[index] = fscrypt_encrypt_pagecache_blocks(page,
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1270 PAGE_SIZE,
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1271 0,
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1272 gfp_flags);
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1273 if (IS_ERR(pages[index])) {
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1274 if (PTR_ERR(pages[index]) == -EINVAL) {
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1275 pr_err_client(cl, "inode->i_blkbits=%hhu\n",
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1276 inode->i_blkbits);
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1277 }
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1278
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1279 /* better not fail on first page! */
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1280 BUG_ON(ceph_wbc->locked_pages == 0);
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1281
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 @1282 pages[index] = NULL;
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 @1283 return PTR_ERR(pages[index]);
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1284 }
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1285 } else {
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1286 pages[index] = page;
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1287 }
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1288
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1289 ceph_wbc->locked_pages++;
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1290
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1291 return 0;
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1292 }
ce80b76dd32764 Viacheslav Dubeyko 2025-02-04 1293
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-04-30 1:48 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=202504300933.l6UNPehu-lkp@intel.com \
--to=lkp@intel.com \
--cc=julia.lawall@inria.fr \
--cc=oe-kbuild@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 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.