* [bug report] NFS: Convert buffered writes to use folios
@ 2023-02-22 14:02 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2023-02-22 14:02 UTC (permalink / raw)
To: trond.myklebust; +Cc: linux-nfs
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-02-23 4:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-22 14:02 [bug report] NFS: Convert buffered writes to use folios Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox