fs/namei.c: fix warnings on 32-bit
[deliverable/linux.git] / fs / namei.c
index 378497a744b4a2bc6b1a107eaeb689ffefec570c..561db47ae0414318a8c5f88b48dfeda757a29c30 100644 (file)
@@ -1455,9 +1455,15 @@ done:
 }
 EXPORT_SYMBOL(full_name_hash);
 
+#ifdef CONFIG_64BIT
 #define ONEBYTES       0x0101010101010101ul
 #define SLASHBYTES     0x2f2f2f2f2f2f2f2ful
 #define HIGHBITS       0x8080808080808080ul
+#else
+#define ONEBYTES       0x01010101ul
+#define SLASHBYTES     0x2f2f2f2ful
+#define HIGHBITS       0x80808080ul
+#endif
 
 /* Return the high bit set in the first byte that is a zero */
 static inline unsigned long has_zero(unsigned long a)
@@ -2284,7 +2290,7 @@ static struct file *do_last(struct nameidata *nd, struct path *path,
                /* sayonara */
                error = complete_walk(nd);
                if (error)
-                       return ERR_PTR(-ECHILD);
+                       return ERR_PTR(error);
 
                error = -ENOTDIR;
                if (nd->flags & LOOKUP_DIRECTORY) {
@@ -2383,7 +2389,7 @@ static struct file *do_last(struct nameidata *nd, struct path *path,
        /* Why this, you ask?  _Now_ we might have grown LOOKUP_JUMPED... */
        error = complete_walk(nd);
        if (error)
-               goto exit;
+               return ERR_PTR(error);
        error = -EISDIR;
        if (S_ISDIR(nd->inode->i_mode))
                goto exit;
@@ -3493,9 +3499,9 @@ retry:
        if (err)
                goto fail;
 
-       kaddr = kmap_atomic(page, KM_USER0);
+       kaddr = kmap_atomic(page);
        memcpy(kaddr, symname, len-1);
-       kunmap_atomic(kaddr, KM_USER0);
+       kunmap_atomic(kaddr);
 
        err = pagecache_write_end(NULL, mapping, 0, len-1, len-1,
                                                        page, fsdata);
This page took 0.042382 seconds and 5 git commands to generate.