diff mbox

ext4: serialize unaligned asynchronous DIO

Message ID 20140527153808.GA1158@thunk.org
State Not Applicable, archived
Headers show

Commit Message

Theodore Ts'o May 27, 2014, 3:38 p.m. UTC
On Tue, May 27, 2014 at 05:17:08PM +0300, Dan Carpenter wrote:
> Hello Namjae Jeon,
> 
> The patch 00532604c72e: "ext4: introduce new i_write_mutex to protect
> fallocate" from May 26, 2014, leads to the following static checker
> warning:

Thanks, already fixed with the following incremental patch.

		      	       		 	     - Ted



--
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
diff mbox

Patch

diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index 8c39305..e5cd87f 100644
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -135,8 +135,8 @@  ext4_file_write(struct kiocb *iocb, const struct iovec *iov,
 		if ((pos > sbi->s_bitmap_maxbytes) ||
 		    (pos == sbi->s_bitmap_maxbytes && length > 0)) {
 			mutex_unlock(&inode->i_mutex);
-			ret = -EFBIG;
-			goto errout;
+			mutex_unlock(&EXT4_I(inode)->i_write_mutex);
+			return -EFBIG;
 		}
 
 		if (pos + length > sbi->s_bitmap_maxbytes) {
@@ -196,7 +196,6 @@  ext4_file_write(struct kiocb *iocb, const struct iovec *iov,
 	if (o_direct)
 		blk_finish_plug(&plug);
 
-errout:
 	if (unaligned_direct_aio)
 		mutex_unlock(&EXT4_I(inode)->i_write_mutex);
 	return ret;