Re: [PATCH] ovl: set I_CREATING on inode being created
From: Linus Torvalds
Date: Wed Aug 22 2018 - 16:15:06 EST
On Wed, Aug 22, 2018 at 12:58 PM Miklos Szeredi <miklos@xxxxxxxxxx> wrote:
>
> > So I'd like some clarification on this point before applying it. It's
> > possible that the spinlock is required, I just want to understand why.
>
> I added the spinlock, because it's cheap (new_inode() already pulls it
> into L1 cache) and because it's much harder to prove that lockless one
> is correct than just adding that locking.
Ok, thanks, looks good to me. And looking around, I think it matches
most of the other cases of us setting those I_NEW and I_CREATING
flags, so I guess it's good from a consistency standpoint too.
I just wanted that clarified, but I'll just apply the patch directly.
Thanks,
Linus