* [bug report] NFSv4/flexfiles: Update low level helper functions to be DS stripe aware.
@ 2025-09-23 10:38 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2025-09-23 10:38 UTC (permalink / raw)
To: Jonathan Curley; +Cc: linux-nfs
Hello Jonathan Curley,
This is a semi-automatic email about new static checker warnings.
Commit e142d1137b17 ("NFSv4/flexfiles: Update low level helper
functions to be DS stripe aware.") from Aug 25, 2025, leads to the
following Smatch complaint:
fs/nfs/flexfilelayout/flexfilelayoutdev.c:598 ff_rw_layout_has_available_ds()
warn: variable dereferenced before check 'mirror' (see line 597)
fs/nfs/flexfilelayout/flexfilelayoutdev.c
596 mirror = FF_LAYOUT_COMP(lseg, idx);
597 for (dss_id = 0; dss_id < mirror->dss_count; dss_id++) {
^^^^^^^^
Dereference
598 if (!mirror || IS_ERR(mirror->dss[dss_id].mirror_ds))
^^^^^^^
NULL check is too late.
599 return false;
600 if (!mirror->dss[dss_id].mirror_ds)
regards,
dan carpenter
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-09-23 10:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-23 10:38 [bug report] NFSv4/flexfiles: Update low level helper functions to be DS stripe aware Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox