From: Theodore Ts'o <tytso@mit.edu>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Namjae Jeon <namjae.jeon@samsung.com>, linux-ext4@vger.kernel.org
Subject: Re: ext4: serialize unaligned asynchronous DIO
Date: Tue, 27 May 2014 11:38:08 -0400 [thread overview]
Message-ID: <20140527153808.GA1158@thunk.org> (raw)
In-Reply-To: <20140527141708.GA2842@mwanda>
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
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;
prev parent reply other threads:[~2014-05-27 15:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-27 14:17 ext4: serialize unaligned asynchronous DIO Dan Carpenter
2014-05-27 15:38 ` Theodore Ts'o [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140527153808.GA1158@thunk.org \
--to=tytso@mit.edu \
--cc=dan.carpenter@oracle.com \
--cc=linux-ext4@vger.kernel.org \
--cc=namjae.jeon@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.