From: Dan Carpenter <error27@gmail.com>
To: trond.myklebust@hammerspace.com
Cc: linux-nfs@vger.kernel.org
Subject: [bug report] NFS: Convert buffered writes to use folios
Date: Wed, 22 Feb 2023 17:02:18 +0300 [thread overview]
Message-ID: <Y/YgahwOk4DL217a@kili> (raw)
Hello Trond Myklebust,
This is a semi-automatic email about new static checker warnings.
The patch 0c493b5cf16e: "NFS: Convert buffered writes to use folios"
from Jan 19, 2023, leads to the following Smatch complaint:
fs/nfs/write.c:793 nfs_inode_remove_request()
warn: variable dereferenced before check 'folio' (see line 790)
fs/nfs/write.c
789 struct folio *folio = nfs_page_to_folio(req->wb_head);
790 struct address_space *mapping = folio_file_mapping(folio);
^^^^^
Patch adds dereference
791
792 spin_lock(&mapping->private_lock);
793 if (likely(folio && !folio_test_swapcache(folio))) {
^^^^^
Patch adds a check (too late).
794 folio->private = NULL;
795 folio_clear_private(folio);
regards,
dan carpenter
reply other threads:[~2023-02-23 4:57 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=Y/YgahwOk4DL217a@kili \
--to=error27@gmail.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@hammerspace.com \
/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