aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-12-09 11:02:51 -0500
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-12-23 05:19:14 -0500
commit7bbe5b5aa6d1e38af6f1fc866efc0aa461d73f19 (patch)
treef9cd48adda1b832c77a7cca63534a4fce2648546
parent995be04548f62c8e6b447410cd28b0666614b461 (diff)
UBIFS: use PAGE_CACHE_MASK correctly
It has high bits set, not low bits set as the UBIFS code assumed. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
-rw-r--r--fs/ubifs/file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c
index 2624411d9758..7f1de98e6091 100644
--- a/fs/ubifs/file.c
+++ b/fs/ubifs/file.c
@@ -254,7 +254,7 @@ static int write_begin_slow(struct address_space *mapping,
254 } 254 }
255 255
256 if (!PageUptodate(page)) { 256 if (!PageUptodate(page)) {
257 if (!(pos & PAGE_CACHE_MASK) && len == PAGE_CACHE_SIZE) 257 if (!(pos & ~PAGE_CACHE_MASK) && len == PAGE_CACHE_SIZE)
258 SetPageChecked(page); 258 SetPageChecked(page);
259 else { 259 else {
260 err = do_readpage(page); 260 err = do_readpage(page);
@@ -444,7 +444,7 @@ static int ubifs_write_begin(struct file *file, struct address_space *mapping,
444 444
445 if (!PageUptodate(page)) { 445 if (!PageUptodate(page)) {
446 /* The page is not loaded from the flash */ 446 /* The page is not loaded from the flash */
447 if (!(pos & PAGE_CACHE_MASK) && len == PAGE_CACHE_SIZE) 447 if (!(pos & ~PAGE_CACHE_MASK) && len == PAGE_CACHE_SIZE)
448 /* 448 /*
449 * We change whole page so no need to load it. But we 449 * We change whole page so no need to load it. But we
450 * have to set the @PG_checked flag to make the further 450 * have to set the @PG_checked flag to make the further