From: Dmitriy Monakhov <dmonakhov@sw.ru>
To: Dmitriy Monakhov <dmonakhov@openvz.org>
Cc: linux-kernel@vger.kernel.org, devel@openvz.org,
ecryptfs-devel@lists.sourceforge.net
Subject: [PATCH] ecryptfs remove unnecessary flush_dcache_page
Date: Thu, 22 Feb 2007 10:34:00 +0300 [thread overview]
Message-ID: <87r6si7ijb.fsf@sw.ru> (raw)
In-Reply-To: <87wt2ew716.fsf@sw.ru> (Dmitriy Monakhov's message of "Mon, 19 Feb 2007 17:34:13 +0300")
[-- Attachment #1: Type: text/plain, Size: 823 bytes --]
Dmitriy Monakhov <dmonakhov@openvz.org> writes:
> 1)Function ecryptfs_do_readpage() calls flush_dcache_page(lower_page),
> but lower_page was't changed here. So remove this line.
>
> 2)prepare_write ret val was ignored in ecryptfs_write_inode_size_to_header().
> If error happends we can't call commit_write, just do cleanup and fial.
> It is issue easy to reproduce with full lower_fs, in this case prepare_write()
Second issue was fixed by "ecryptfs-resolve-lower-page-unlocking-problem.patch",
but first issue was't.
[LOG]
Function ecryptfs_do_readpage() calls flush_dcache_page(lower_page),
but lower_page was't changed here. Even if it was changed by
lower_a_ops->readpage() dcache was flushed by readpage() itself.
So remove this unnecessary line.
Signed-off-by: Dmitriy Monakhov <dmonakhov@openvz.org>
[-- Attachment #2: diff-mm-ecryptfs-false-flush_dcache --]
[-- Type: text/plain, Size: 478 bytes --]
diff --git a/fs/ecryptfs/mmap.c b/fs/ecryptfs/mmap.c
index 1e5d2ba..2e45513 100644
--- a/fs/ecryptfs/mmap.c
+++ b/fs/ecryptfs/mmap.c
@@ -238,7 +238,6 @@ int ecryptfs_do_readpage(struct file *file, struct page *page,
lower_page_data = kmap_atomic(lower_page, KM_USER1);
memcpy(page_data, lower_page_data, PAGE_CACHE_SIZE);
kunmap_atomic(lower_page_data, KM_USER1);
- flush_dcache_page(lower_page);
kunmap_atomic(page_data, KM_USER0);
flush_dcache_page(page);
rc = 0;
prev parent reply other threads:[~2007-02-22 7:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-19 14:34 [PATCH] ecryptfs lower_file handling issues Dmitriy Monakhov
2007-02-22 7:34 ` Dmitriy Monakhov [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=87r6si7ijb.fsf@sw.ru \
--to=dmonakhov@sw.ru \
--cc=devel@openvz.org \
--cc=dmonakhov@openvz.org \
--cc=ecryptfs-devel@lists.sourceforge.net \
--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 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.