Skip to contentSkip to conversation

fat: double unlock on error path

PATCH In review Dan Carpenter 3 participants 3 messages Nov 7, 2013 – Nov 8, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fat: double unlock on error path

There is a stray unlock here which was not intended. I have removed it.

Fixes 3f9f3dfb5755 ('fat: add fat_fallocate operation')
fs/fat/file.c +1 -3
index 03f716f..befedee 100644
@@ -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 */
maintainer
#1 lore raw
Quoted 11 lines · Dan Carpenter

There is a stray unlock here which was not intended. I have removed it.

Fixes 3f9f3dfb5755 ('fat: add fat_fallocate operation')
fs/fat/file.c +0 -0
index 03f716f..befedee 100644
@@ -257,10 +257,8 @@ static long fat_fallocate(struct file *file, int mode,
 		goto error;

fs/fat/file.c static long fat_fallocate(struct file *file, int mode, · line 264

Quoted 10 lines
fs/fat/file.c +1 -3
 
 	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.

Signature · 1 line
OGAWA Hirofumi <[email protected]>
#2 lore raw

2013/11/8, OGAWA Hirofumi <[email protected]>:

Quoted 22 lines
Quoted 20 lines · Dan Carpenter

There is a stray unlock here which was not intended. I have removed it.

Fixes 3f9f3dfb5755 ('fat: add fat_fallocate operation')
fs/fat/file.c +1 -3
index 03f716f..befedee 100644
@@ -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;
-	}
 
Quoted 4 lines
Quoted 2 lines
fs/fat/file.c +0 -0
 	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!

Quoted 10 lines

Thanks.
--
OGAWA Hirofumi <[email protected]>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/