From: Matthew Wilcox <willy@infradead.org>
To: Lukas Czerner <lczerner@redhat.com>
Cc: Hugh Dickins <hughd@google.com>, Jan Kara <jack@suse.com>,
Eric Sandeen <sandeen@redhat.com>,
linux-mm@kvack.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 1/2] shmem: implement user/group quota support for tmpfs
Date: Tue, 8 Nov 2022 20:03:37 +0000 [thread overview]
Message-ID: <Y2q2GRFDBi+XTvgi@casper.infradead.org> (raw)
In-Reply-To: <20221108133010.75226-2-lczerner@redhat.com>
On Tue, Nov 08, 2022 at 02:30:09PM +0100, Lukas Czerner wrote:
> + err = shmem_get_folio(inode, index, &folio, SGP_WRITE);
> + if (err)
> + return err;
> +
> + page = folio_file_page(folio, index);
> + if (PageHWPoison(page)) {
> + folio_unlock(folio);
> + folio_put(folio);
> + return -EIO;
> + }
> +
> + /* Write data, or zeroout the portion of the page */
> + if (data)
> + memcpy(page_address(page) + offset, data, len);
> + else
> + memset(page_address(page) + offset, 0, len);
> +
> + SetPageUptodate(page);
This is suspicious. There is no per-page Uptodate bit, there is only a
per-folio Uptodate bit. So this should be folio_mark_uptodate().
Except that you've only done one of the pages in the folio, so you
have no business setting the uptodate bit at all.
next prev parent reply other threads:[~2022-11-08 20:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-08 13:30 [PATCH 0/2] [RFC] shmem: user and group quota support for tmpfs Lukas Czerner
2022-11-08 13:30 ` [PATCH 1/2] shmem: implement user/group " Lukas Czerner
2022-11-08 16:25 ` Darrick J. Wong
2022-11-08 16:52 ` Jan Kara
2022-11-09 9:30 ` Lukas Czerner
2022-11-08 20:03 ` Matthew Wilcox [this message]
2022-11-09 1:52 ` kernel test robot
2022-11-09 13:10 ` kernel test robot
2022-11-12 3:29 ` kernel test robot
2022-11-08 13:30 ` [PATCH 2/2] shmem: implement mount options for global quota limits Lukas Czerner
2022-11-08 16:35 ` Darrick J. Wong
2022-11-09 9:02 ` Lukas Czerner
2022-11-08 17:43 ` [PATCH 0/2] [RFC] shmem: user and group quota support for tmpfs Jan Kara
2022-11-09 9:41 ` Lukas Czerner
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=Y2q2GRFDBi+XTvgi@casper.infradead.org \
--to=willy@infradead.org \
--cc=hughd@google.com \
--cc=jack@suse.com \
--cc=lczerner@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=sandeen@redhat.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 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).