From: Chao Yu <yuchao0@huawei.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH 2/2] f2fs: don't allow atomic writes for not regular files
Date: Fri, 17 Mar 2017 11:23:14 +0800 [thread overview]
Message-ID: <d3c6be41-7b81-b10f-c3f6-8a7beceae202@huawei.com> (raw)
In-Reply-To: <20170317020906.28165-2-jaegeuk@kernel.org>
On 2017/3/17 10:09, Jaegeuk Kim wrote:
> The atomic writes only supports regular files for database.
>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> ---
> fs/f2fs/file.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
> index da6d33d1bb34..d486e02b43c2 100644
> --- a/fs/f2fs/file.c
> +++ b/fs/f2fs/file.c
> @@ -1522,6 +1522,9 @@ static int f2fs_ioc_start_atomic_write(struct file *filp)
> if (f2fs_is_atomic_file(inode))
> goto out;
>
> + if (!S_ISREG(inode->i_mode))
> + return -EINVAL;
goto out;
Thanks,
> +
> ret = f2fs_convert_inline_inode(inode);
> if (ret)
> goto out;
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
next prev parent reply other threads:[~2017-03-17 3:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-17 2:09 [PATCH 1/2] f2fs: fix stale ATOMIC_WRITTEN_PAGE private pointer Jaegeuk Kim
2017-03-17 2:09 ` [PATCH 2/2] f2fs: don't allow atomic writes for not regular files Jaegeuk Kim
2017-03-17 3:23 ` Chao Yu [this message]
2017-03-17 12:40 ` Jaegeuk Kim
2017-03-17 6:51 ` [f2fs-dev] [PATCH 1/2] f2fs: fix stale ATOMIC_WRITTEN_PAGE private pointer Chao Yu
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=d3c6be41-7b81-b10f-c3f6-8a7beceae202@huawei.com \
--to=yuchao0@huawei.com \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@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).