diff options
Diffstat (limited to 'fs/ubifs/file.c')
-rw-r--r-- | fs/ubifs/file.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c index 2624411d9758..fe82d2464d46 100644 --- a/fs/ubifs/file.c +++ b/fs/ubifs/file.c | |||
@@ -72,8 +72,8 @@ static int read_block(struct inode *inode, void *addr, unsigned int block, | |||
72 | return err; | 72 | return err; |
73 | } | 73 | } |
74 | 74 | ||
75 | ubifs_assert(le64_to_cpu(dn->ch.sqnum) > ubifs_inode(inode)->creat_sqnum); | 75 | ubifs_assert(le64_to_cpu(dn->ch.sqnum) > |
76 | 76 | ubifs_inode(inode)->creat_sqnum); | |
77 | len = le32_to_cpu(dn->size); | 77 | len = le32_to_cpu(dn->size); |
78 | if (len <= 0 || len > UBIFS_BLOCK_SIZE) | 78 | if (len <= 0 || len > UBIFS_BLOCK_SIZE) |
79 | goto dump; | 79 | goto dump; |
@@ -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 |