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>
This commit is contained in:
Artem Bityutskiy 2008-12-09 11:02:51 -05:00
parent 995be04548
commit 7bbe5b5aa6

View file

@ -254,7 +254,7 @@ static int write_begin_slow(struct address_space *mapping,
} }
if (!PageUptodate(page)) { if (!PageUptodate(page)) {
if (!(pos & PAGE_CACHE_MASK) && len == PAGE_CACHE_SIZE) if (!(pos & ~PAGE_CACHE_MASK) && len == PAGE_CACHE_SIZE)
SetPageChecked(page); SetPageChecked(page);
else { else {
err = do_readpage(page); err = do_readpage(page);
@ -444,7 +444,7 @@ static int ubifs_write_begin(struct file *file, struct address_space *mapping,
if (!PageUptodate(page)) { if (!PageUptodate(page)) {
/* The page is not loaded from the flash */ /* The page is not loaded from the flash */
if (!(pos & PAGE_CACHE_MASK) && len == PAGE_CACHE_SIZE) if (!(pos & ~PAGE_CACHE_MASK) && len == PAGE_CACHE_SIZE)
/* /*
* We change whole page so no need to load it. But we * We change whole page so no need to load it. But we
* have to set the @PG_checked flag to make the further * have to set the @PG_checked flag to make the further