All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: Alistair Popple <apopple@nvidia.com>
Cc: nvdimm@lists.linux.dev
Subject: [bug report] fs/dax: create a common implementation to break DAX layouts
Date: Fri, 10 Jan 2025 09:37:48 +0300	[thread overview]
Message-ID: <92b31d7c-3a51-4cc4-a679-ddf271fa8521@stanley.mountain> (raw)

Hello Alistair Popple,

Commit 738ec092051b ("fs/dax: create a common implementation to break
DAX layouts") from Jan 7, 2025 (linux-next), leads to the following
Smatch static checker warning:

	fs/dax.c:966 dax_break_mapping()
	error: uninitialized symbol 'error'.

fs/dax.c
   946  int dax_break_mapping(struct inode *inode, loff_t start, loff_t end,
   947                  void (cb)(struct inode *))
   948  {
   949          struct page *page;
   950          int error;
   951  
   952          if (!dax_mapping(inode->i_mapping))
   953                  return 0;
   954  
   955          do {
   956                  page = dax_layout_busy_page_range(inode->i_mapping, start, end);
   957                  if (!page)

error is uninitialized if dax_layout_busy_page_range() returns NULL on
first iteration.

   958                          break;
   959  
   960                  error = wait_page_idle(page, cb, inode);
   961          } while (error == 0);
   962  
   963          if (!page)
   964                  dax_delete_mapping_range(inode->i_mapping, start, end);
   965  
   966          return error;
   967  }


regards,
dan carpenter

             reply	other threads:[~2025-01-10  6:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-10  6:37 Dan Carpenter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-01-10  7:03 [bug report] fs/dax: create a common implementation to break DAX layouts Dan Carpenter
2025-01-10 16:57 ` Darrick J. Wong

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=92b31d7c-3a51-4cc4-a679-ddf271fa8521@stanley.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=apopple@nvidia.com \
    --cc=nvdimm@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.