* ntfs: remove unnecessary PG_uptodate check from ntfs_readpage
@ 2006-07-25 12:43 Pekka J Enberg
2006-07-25 14:03 ` Anton Altaparmakov
0 siblings, 1 reply; 3+ messages in thread
From: Pekka J Enberg @ 2006-07-25 12:43 UTC (permalink / raw)
To: aia21; +Cc: akpm, linux-kernel
From: Pekka Enberg <penberg@cs.helsinki.fi>
The check is not needed because SetPageUptodate is called for locked pages
and callers of ->readpage either explicitly check for PageUptodate or pass
newly allocated pages (see read_cache_pages and page_cache_read).
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
---
fs/ntfs/aops.c | 8 --------
1 file changed, 8 deletions(-)
Index: 2.6/fs/ntfs/aops.c
===================================================================
--- 2.6.orig/fs/ntfs/aops.c
+++ 2.6/fs/ntfs/aops.c
@@ -410,14 +410,6 @@ static int ntfs_readpage(struct file *fi
retry_readpage:
BUG_ON(!PageLocked(page));
- /*
- * This can potentially happen because we clear PageUptodate() during
- * ntfs_writepage() of MstProtected() attributes.
- */
- if (PageUptodate(page)) {
- unlock_page(page);
- return 0;
- }
vi = page->mapping->host;
ni = NTFS_I(vi);
/*
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ntfs: remove unnecessary PG_uptodate check from ntfs_readpage
2006-07-25 12:43 ntfs: remove unnecessary PG_uptodate check from ntfs_readpage Pekka J Enberg
@ 2006-07-25 14:03 ` Anton Altaparmakov
2006-07-25 14:13 ` Pekka J Enberg
0 siblings, 1 reply; 3+ messages in thread
From: Anton Altaparmakov @ 2006-07-25 14:03 UTC (permalink / raw)
To: Pekka J Enberg; +Cc: aia21, akpm, linux-kernel
Please do not apply this patch or you will see metadata corruption on
NTFS.
Pekka, given there is a comment saying why this check is necessary, I
really do not understand how you can claim that it is not...
Best regards,
Anton
On Tue, 25 Jul 2006, Pekka J Enberg wrote:
> From: Pekka Enberg <penberg@cs.helsinki.fi>
>
> The check is not needed because SetPageUptodate is called for locked pages
> and callers of ->readpage either explicitly check for PageUptodate or pass
> newly allocated pages (see read_cache_pages and page_cache_read).
>
> Cc: Andrew Morton <akpm@osdl.org>
> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
> ---
>
> fs/ntfs/aops.c | 8 --------
> 1 file changed, 8 deletions(-)
>
> Index: 2.6/fs/ntfs/aops.c
> ===================================================================
> --- 2.6.orig/fs/ntfs/aops.c
> +++ 2.6/fs/ntfs/aops.c
> @@ -410,14 +410,6 @@ static int ntfs_readpage(struct file *fi
>
> retry_readpage:
> BUG_ON(!PageLocked(page));
> - /*
> - * This can potentially happen because we clear PageUptodate() during
> - * ntfs_writepage() of MstProtected() attributes.
> - */
> - if (PageUptodate(page)) {
> - unlock_page(page);
> - return 0;
> - }
> vi = page->mapping->host;
> ni = NTFS_I(vi);
> /*
>
Best regards,
Anton
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer, http://www.linux-ntfs.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ntfs: remove unnecessary PG_uptodate check from ntfs_readpage
2006-07-25 14:03 ` Anton Altaparmakov
@ 2006-07-25 14:13 ` Pekka J Enberg
0 siblings, 0 replies; 3+ messages in thread
From: Pekka J Enberg @ 2006-07-25 14:13 UTC (permalink / raw)
To: Anton Altaparmakov; +Cc: aia21, akpm, linux-kernel
On Tue, 25 Jul 2006, Anton Altaparmakov wrote:
> Please do not apply this patch or you will see metadata corruption on
> NTFS.
>
> Pekka, given there is a comment saying why this check is necessary, I
> really do not understand how you can claim that it is not...
Sorry Anton, that's just me being confused, I guess... I don't see you
dropping page lock in ntfs_writepage so how does that happen then? Thanks.
Pekka
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-07-25 14:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-25 12:43 ntfs: remove unnecessary PG_uptodate check from ntfs_readpage Pekka J Enberg
2006-07-25 14:03 ` Anton Altaparmakov
2006-07-25 14:13 ` Pekka J Enberg
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).