lkml.org 
[lkml]   [2021]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fs/dcache: prevent repeated locking
On Tue, Dec 07, 2021 at 01:25:18PM -0800, Eric Biggers wrote:
> On Tue, Dec 07, 2021 at 01:17:41PM +0000, Matthew Wilcox wrote:
> > On Tue, Dec 07, 2021 at 10:16:46AM +0000, cgel.zte@gmail.com wrote:
> > > From: Lv Ruyi <lv.ruyi@zte.com.cn>
> > >
> > > Move the spin_lock above the restart to prevent to lock twice
> > > when the code goto restart.
> >
> > This is madness.
> >
> > void d_prune_aliases(struct inode *inode)
> > spin_lock(&inode->i_lock);
> > if (likely(!dentry->d_lockref.count)) {
> > __dentry_kill(dentry);
> > goto restart;
> > ...
> > static void __dentry_kill(struct dentry *dentry)
> > if (dentry->d_inode)
> > dentry_unlink_inode(dentry);
> > ...
> > static void dentry_unlink_inode(struct dentry * dentry)
> > spin_unlock(&inode->i_lock);
> >
> > Did you even test this patch?
>
> This same wrong patch has been sent several times before. I think it's fair to
> say that this code could use a comment, e.g.:
>
> /* i_lock was dropped */
> goto restart;

Not sure that'll do much good. It seems to be fools running some script
that they haven't the wit to understand.

\
 
 \ /
  Last update: 2021-12-07 23:12    [W:0.026 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site