All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Brian Foster <bfoster@redhat.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs: fix eofblocks race with file extending async dio writes
Date: Thu, 12 Jan 2017 05:56:03 -0800	[thread overview]
Message-ID: <20170112135603.GD5756@infradead.org> (raw)
In-Reply-To: <1484156571-65403-1-git-send-email-bfoster@redhat.com>

>  		if (need_iolock) {
>  			if (!xfs_ilock_nowait(ip, XFS_IOLOCK_EXCL))
>  				return -EAGAIN;
>  		}
> +		inode_dio_wait(VFS_I(ip));

inode_dio_wait generally is only safe to call with i_rwsem held
exclsuively, so if we'd need the call for the !need_iolock this would
be broken.  Fortunately we don't even need the call in that case, so
this should be safe.  I'd still prefer to move the inode_dio_wait call
into the need_iolock block to make that clear, though.

  reply	other threads:[~2017-01-12 14:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-11 17:42 [PATCH] xfs: fix eofblocks race with file extending async dio writes Brian Foster
2017-01-12 13:56 ` Christoph Hellwig [this message]
2017-01-12 14:05   ` Brian Foster
2017-01-13  7:33     ` Christoph Hellwig
2017-01-13 14:25       ` Brian Foster

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=20170112135603.GD5756@infradead.org \
    --to=hch@infradead.org \
    --cc=bfoster@redhat.com \
    --cc=linux-xfs@vger.kernel.org \
    /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.