From: Christoph Hellwig <hch@infradead.org>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: Eric Biggers <ebiggers3@gmail.com>,
linux-xfs@vger.kernel.org, Eric Biggers <ebiggers@google.com>
Subject: Re: [PATCH v2] xfs: prevent creating negative-sized file via INSERT_RANGE
Date: Tue, 17 Apr 2018 00:09:56 -0700 [thread overview]
Message-ID: <20180417070956.GA18079@infradead.org> (raw)
In-Reply-To: <20180417053907.GE5203@magnolia>
> } else if (mode & FALLOC_FL_INSERT_RANGE) {
> unsigned int blksize_mask = i_blocksize(inode) - 1;
> + loff_t isize;
>
> + isize = i_size_read(inode);
Maybe move the assignment up:
loff_t isize = i_size_read(inode);
But functionally this looks fine:
Reviewed-by: Christoph Hellwig <hch@lst.de>
next prev parent reply other threads:[~2018-04-17 7:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-16 20:46 [PATCH] xfs: prevent creating negative-sized file via INSERT_RANGE Eric Biggers
2018-04-17 0:52 ` Darrick J. Wong
2018-04-17 5:39 ` [PATCH v2] " Darrick J. Wong
2018-04-17 7:09 ` Christoph Hellwig [this message]
2018-04-17 17:55 ` [PATCH v3] " Darrick J. Wong
2018-04-17 18:00 ` Eric Biggers
2018-04-17 18:44 ` Darrick J. Wong
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=20180417070956.GA18079@infradead.org \
--to=hch@infradead.org \
--cc=darrick.wong@oracle.com \
--cc=ebiggers3@gmail.com \
--cc=ebiggers@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).