* re: [PATCH] configfs: User-driven configuration filesystem
@ 2014-07-07 10:49 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2014-07-07 10:49 UTC (permalink / raw)
To: kernel-janitors
Hello Joel Becker,
This is a semi-automatic email about new static checker warnings.
The patch 7063fbf22611: "[PATCH] configfs: User-driven configuration
filesystem" from Dec 15, 2005, leads to the following Smatch
complaint:
fs/configfs/inode.c:256 configfs_drop_dentry()
error: we previously assumed 'dentry->d_inode' could be null (see line 252)
fs/configfs/inode.c
251 spin_lock(&dentry->d_lock);
252 if (!(d_unhashed(dentry) && dentry->d_inode)) {
^^^^^^^^^^^^^^^
We want ->d_inode to be NULL (or d_unhashed() to be false).
253 dget_dlock(dentry);
254 __d_drop(dentry);
255 spin_unlock(&dentry->d_lock);
256 simple_unlink(parent->d_inode, dentry);
^^^^^^
But then we dereference dentry->d_inode here inside the call to
simple_unlink() which is puzzling and means the initial condition is
wrong somehow. Maybe the parenthesis are wrong and it should be:
if (!d_unhashed(dentry) && dentry->d_inode) {
257 } else
258 spin_unlock(&dentry->d_lock);
regards,
dan carpenter
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-07-07 10:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-07 10:49 [PATCH] configfs: User-driven configuration filesystem Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox