ceph: cleanup: remove dead code
[safe/jmp/linux-2.6] / fs / ceph / xattr.c
index 37d6ce6..d940d14 100644 (file)
@@ -3,6 +3,7 @@
 #include "decode.h"
 
 #include <linux/xattr.h>
+#include <linux/slab.h>
 
 static bool ceph_is_valid_xattr(const char *name)
 {
@@ -185,12 +186,6 @@ static int __set_xattr(struct ceph_inode_info *ci,
                ci->i_xattrs.names_size -= xattr->name_len;
                ci->i_xattrs.vals_size -= xattr->val_len;
        }
-       if (!xattr) {
-               pr_err("__set_xattr ENOMEM on %p %llx.%llx xattr %s=%s\n",
-                      &ci->vfs_inode, ceph_vinop(&ci->vfs_inode), name,
-                      xattr->val);
-               return -ENOMEM;
-       }
        ci->i_xattrs.names_size += name_len;
        ci->i_xattrs.vals_size += val_len;
        if (val)
@@ -640,7 +635,7 @@ static int ceph_sync_setxattr(struct dentry *dentry, const char *name,
                        return -ENOMEM;
                err = -ENOMEM;
                for (i = 0; i < nr_pages; i++) {
-                       pages[i] = alloc_page(GFP_NOFS);
+                       pages[i] = __page_cache_alloc(GFP_NOFS);
                        if (!pages[i]) {
                                nr_pages = i;
                                goto out;