* [patch] fat: double unlock on error path
@ 2013-11-07 7:41 Dan Carpenter
2013-11-08 5:06 ` OGAWA Hirofumi
0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2013-11-07 7:41 UTC (permalink / raw)
To: OGAWA Hirofumi; +Cc: linux-kernel, kernel-janitors
There is a stray unlock here which was not intended. I have removed it.
Fixes: 3f9f3dfb5755 ('fat: add fat_fallocate operation')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/fs/fat/file.c b/fs/fat/file.c
index 03f716f..befedee 100644
--- a/fs/fat/file.c
+++ b/fs/fat/file.c
@@ -257,10 +257,8 @@ static long fat_fallocate(struct file *file, int mode,
goto error;
err = inode_newsize_ok(inode, (len + offset));
- if (err) {
- mutex_unlock(&inode->i_mutex);
+ if (err)
goto error;
- }
if (mode & FALLOC_FL_KEEP_SIZE) {
/* First compute the number of clusters to be allocated */
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [patch] fat: double unlock on error path
2013-11-07 7:41 [patch] fat: double unlock on error path Dan Carpenter
@ 2013-11-08 5:06 ` OGAWA Hirofumi
2013-11-08 6:20 ` Namjae Jeon
0 siblings, 1 reply; 3+ messages in thread
From: OGAWA Hirofumi @ 2013-11-08 5:06 UTC (permalink / raw)
To: Dan Carpenter; +Cc: linux-kernel, kernel-janitors, Namjae Jeon
Dan Carpenter <dan.carpenter@oracle.com> writes:
> There is a stray unlock here which was not intended. I have removed it.
>
> Fixes: 3f9f3dfb5755 ('fat: add fat_fallocate operation')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/fs/fat/file.c b/fs/fat/file.c
> index 03f716f..befedee 100644
> --- a/fs/fat/file.c
> +++ b/fs/fat/file.c
> @@ -257,10 +257,8 @@ static long fat_fallocate(struct file *file, int mode,
> goto error;
>
> err = inode_newsize_ok(inode, (len + offset));
> - if (err) {
> - mutex_unlock(&inode->i_mutex);
> + if (err)
> goto error;
> - }
>
> if (mode & FALLOC_FL_KEEP_SIZE) {
> /* First compute the number of clusters to be allocated */
Right. Namjae, please include this fix to patchset at next time.
Thanks.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] fat: double unlock on error path
2013-11-08 5:06 ` OGAWA Hirofumi
@ 2013-11-08 6:20 ` Namjae Jeon
0 siblings, 0 replies; 3+ messages in thread
From: Namjae Jeon @ 2013-11-08 6:20 UTC (permalink / raw)
To: OGAWA Hirofumi; +Cc: Dan Carpenter, linux-kernel, kernel-janitors, Namjae Jeon
2013/11/8, OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>:
> Dan Carpenter <dan.carpenter@oracle.com> writes:
>
>> There is a stray unlock here which was not intended. I have removed it.
>>
>> Fixes: 3f9f3dfb5755 ('fat: add fat_fallocate operation')
>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>>
>> diff --git a/fs/fat/file.c b/fs/fat/file.c
>> index 03f716f..befedee 100644
>> --- a/fs/fat/file.c
>> +++ b/fs/fat/file.c
>> @@ -257,10 +257,8 @@ static long fat_fallocate(struct file *file, int
>> mode,
>> goto error;
>>
>> err = inode_newsize_ok(inode, (len + offset));
>> - if (err) {
>> - mutex_unlock(&inode->i_mutex);
>> + if (err)
>> goto error;
>> - }
>>
>> if (mode & FALLOC_FL_KEEP_SIZE) {
>> /* First compute the number of clusters to be allocated */
>
> Right. Namjae, please include this fix to patchset at next time.
Okay, I will include it in the next patch-set.
Thank you!
>
> Thanks.
> --
> OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-11-08 6:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-07 7:41 [patch] fat: double unlock on error path Dan Carpenter
2013-11-08 5:06 ` OGAWA Hirofumi
2013-11-08 6:20 ` Namjae Jeon
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).