* [patch] missing unlock in ext2_quota_write()
@ 2009-04-07 7:52 Dan Carpenter
2009-04-09 16:09 ` Jan Kara
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2009-04-07 7:52 UTC (permalink / raw)
To: linux-ext4
The inode->i_mutex should be unlocked.
Found by smatch (http://repo.or.cz/w/smatch.git). Compile tested.
regards,
dan carpenter
Signed-off-by: Dan Carpenter <error27@gmail.com>
--- orig/fs/ext2/super.c 2009-04-07 08:42:15.000000000 +0300
+++ devel/fs/ext2/super.c 2009-04-07 08:43:19.000000000 +0300
@@ -1394,8 +1394,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++;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch] missing unlock in ext2_quota_write()
2009-04-07 7:52 [patch] missing unlock in ext2_quota_write() Dan Carpenter
@ 2009-04-09 16:09 ` Jan Kara
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2009-04-09 16:09 UTC (permalink / raw)
To: Dan Carpenter; +Cc: linux-ext4
> The inode->i_mutex should be unlocked.
>
> Found by smatch (http://repo.or.cz/w/smatch.git). Compile tested.
>
> regards,
> dan carpenter
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Thanks for the fix. Merged into quota tree.
Honza
>
> --- orig/fs/ext2/super.c 2009-04-07 08:42:15.000000000 +0300
> +++ devel/fs/ext2/super.c 2009-04-07 08:43:19.000000000 +0300
> @@ -1394,8 +1394,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++;
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Jan Kara <jack@suse.cz>
SuSE CR Labs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-04-09 16:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-07 7:52 [patch] missing unlock in ext2_quota_write() Dan Carpenter
2009-04-09 16:09 ` Jan Kara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).