mm: vmscan: take page buffers dirty and locked state into account
[cascardo/linux.git] / fs / ubifs / file.c
index 1437453..123c79b 100644 (file)
@@ -1277,13 +1277,14 @@ int ubifs_setattr(struct dentry *dentry, struct iattr *attr)
        return err;
 }
 
-static void ubifs_invalidatepage(struct page *page, unsigned long offset)
+static void ubifs_invalidatepage(struct page *page, unsigned int offset,
+                                unsigned int length)
 {
        struct inode *inode = page->mapping->host;
        struct ubifs_info *c = inode->i_sb->s_fs_info;
 
        ubifs_assert(PagePrivate(page));
-       if (offset)
+       if (offset || length < PAGE_CACHE_SIZE)
                /* Partial page remains dirty */
                return;