[PATCH 3/3] jffs2: put directories f->sem on a separate lockdep class

David Woodhouse dwmw2 at infradead.org
Fri Apr 27 05:54:55 PDT 2018


On Fri, 2018-04-27 at 12:30 +0200, Helmut Grohne wrote:
> 
> @@ -60,6 +62,7 @@ static void jffs2_i_init_once(void *foo)
>         struct jffs2_inode_info *f = foo;
>  
>         mutex_init(&f->sem);
> +       lockdep_set_class(&f->sem, &jffs2_inode_info_sem_key);
>         inode_init_once(&f->vfs_inode);
>  }
>  

The point in init_once is that inode structures can get reused. So if
it gets used the first time for a directory, then re-used for a file,
nothing ever sets the lockdep class back to jffs2_inode_info_sem_key.

Other than that, this all looks good; thanks!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5213 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20180427/af160aaf/attachment-0001.bin>


More information about the linux-mtd mailing list