From: Junxiao Bi <junxiao.bi@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] Remove unecessary ocfs2_iocb_clear_sem_locked
Date: Thu, 10 Jan 2013 09:07:24 +0800 [thread overview]
Message-ID: <50EE144C.8080500@oracle.com> (raw)
In-Reply-To: <CAJtY7HXvfg44yD=U7-upbtsYEwMpkR0w9r=rC4HM5tcsuHS7hg@mail.gmail.com>
On 01/10/2013 01:01 AM, Goldwyn Rodrigues wrote:
> Since 2dfd06036ba7ae8e7be2daf5a2fff1dac42390bf, the private field of
> kiocb is initialized in init_sync_kiocb(). This obviates the need to
> clear the OCFS2_IOCB_SEM bits. This will save a few cycles/flushes.
>
> Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Fine to me.
Thanks,
Junxiao
>
> ---
> diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
> index 37d313e..2946c3e 100644
> --- a/fs/ocfs2/file.c
> +++ b/fs/ocfs2/file.c
> @@ -2254,8 +2254,6 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb,
>
> mutex_lock(&inode->i_mutex);
>
> - ocfs2_iocb_clear_sem_locked(iocb);
> -
> relock:
> /* to match setattr's i_mutex -> rw_lock ordering */
> if (direct_io) {
> @@ -2560,8 +2558,6 @@ static ssize_t ocfs2_file_aio_read(struct kiocb *iocb,
> goto bail;
> }
>
> - ocfs2_iocb_clear_sem_locked(iocb);
> -
> /*
> * buffered reads protect themselves in ->readpage(). O_DIRECT reads
> * need locks to protect pending reads from racing with truncate.
prev parent reply other threads:[~2013-01-10 1:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-09 17:01 [Ocfs2-devel] [PATCH] Remove unecessary ocfs2_iocb_clear_sem_locked Goldwyn Rodrigues
2013-01-10 1:07 ` Junxiao Bi [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=50EE144C.8080500@oracle.com \
--to=junxiao.bi@oracle.com \
--cc=ocfs2-devel@oss.oracle.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.