include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[safe/jmp/linux-2.6] / fs / ntfs / compress.c
index d1619d0..6551c7c 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/buffer_head.h>
 #include <linux/blkdev.h>
 #include <linux/vmalloc.h>
+#include <linux/slab.h>
 
 #include "attrib.h"
 #include "inode.h"
@@ -565,7 +566,7 @@ int ntfs_read_compressed_block(struct page *page)
        if (xpage >= max_page) {
                kfree(bhs);
                kfree(pages);
-               zero_user_page(page, 0, PAGE_CACHE_SIZE, KM_USER0);
+               zero_user(page, 0, PAGE_CACHE_SIZE);
                ntfs_debug("Compressed read outside i_size - truncated?");
                SetPageUptodate(page);
                unlock_page(page);
@@ -665,7 +666,7 @@ lock_retry_remap:
        for (i = 0; i < nr_bhs; i++) {
                struct buffer_head *tbh = bhs[i];
 
-               if (unlikely(test_set_buffer_locked(tbh)))
+               if (!trylock_buffer(tbh))
                        continue;
                if (unlikely(buffer_uptodate(tbh))) {
                        unlock_buffer(tbh);
@@ -927,7 +928,7 @@ lock_retry_remap:
                return 0;
 
        ntfs_debug("Failed. Returning error code %s.", err == -EOVERFLOW ?
-                       "EOVERFLOW" : (!err ? "EIO" : "unkown error"));
+                       "EOVERFLOW" : (!err ? "EIO" : "unknown error"));
        return err < 0 ? err : -EIO;
 
 read_err: