Re: [PATCH 2/3] jffs2: jffs2_iget defer f->sem acquisition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 27, 2018 at 12:37 PM Helmut Grohne <h.grohne@xxxxxxxxxx> wrote:
>
> At the point where f->sem is taken, we know that we have a locked I_NEW
> inode. Since jffs2_iget is the only function processing I_NEW inodes and
> iget_locked blocks on I_NEW inodes, we know that we are the only user of
> the inode until we unlock_new_inode it. Since 7aaea7605c0 ("jffs2: fix
> unbalanced locking"), jffs2_do_read_inode no longer touches f->sem and
> does not make the inode visible to others either. Thus we can call it
> without f->sem acquired. Nextup, inode->i_mode is protected until
> unlock_new_inode.
>
> After deferring the locking, we can decide upon the proper lock class
> depending on inode->i_mode.
>
> Signed-off-by: Helmut Grohne <h.grohne@xxxxxxxxxx>
> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>

Reviewed-by: Richard Weinberger <richard@xxxxxx>

-- 
Thanks,
//richard

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux