Re: [Jfs-discussion] [patch] missing unlock in jfs_quota_write()
Brought to you by:
blaschke-oss,
shaggyk
From: Dave K. <sh...@li...> - 2009-04-07 13:47:18
|
Thanks! Applied. On Tue, 2009-04-07 at 14:48 +0300, Dan Carpenter wrote: > We should unlock &inode->i_mutex on the error path. This bug was > in ext2_quota_write(). I sent a patch to them today as well. > > Found by smatch (http://repo.or.cz/w/smatch.git). Compile tested. > > regards, > dan carpenter > > Signed-off-by: Dan Carpenter <er...@gm...> Signed-off-by: Dave Kleikamp <sh...@li...> > > --- orig/fs/jfs/super.c 2009-04-07 13:44:37.000000000 +0300 > +++ devel/fs/jfs/super.c 2009-04-07 13:44:42.000000000 +0300 > @@ -716,8 +716,10 @@ > blk++; > } > out: > - if (len == towrite) > + if (len == towrite) { > + mutex_unlock(&inode->i_mutex); > return err; > + } > if (inode->i_size < off+len-towrite) > i_size_write(inode, off+len-towrite); > inode->i_version++; -- David Kleikamp IBM Linux Technology Center |