]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - fs/gfs2/dentry.c
thp: don't alloc harder for gfp nomemalloc even if nowait
[mv-sheeva.git] / fs / gfs2 / dentry.c
index 6798755b3858685b611da5e439393bcffb332563..4a456338b8733bdc26864d183c12239f290dd404 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/completion.h>
 #include <linux/buffer_head.h>
 #include <linux/gfs2_ondisk.h>
+#include <linux/namei.h>
 #include <linux/crc32.h>
 
 #include "gfs2.h"
 
 static int gfs2_drevalidate(struct dentry *dentry, struct nameidata *nd)
 {
-       struct dentry *parent = dget_parent(dentry);
-       struct gfs2_sbd *sdp = GFS2_SB(parent->d_inode);
-       struct gfs2_inode *dip = GFS2_I(parent->d_inode);
-       struct inode *inode = dentry->d_inode;
+       struct dentry *parent;
+       struct gfs2_sbd *sdp;
+       struct gfs2_inode *dip;
+       struct inode *inode;
        struct gfs2_holder d_gh;
        struct gfs2_inode *ip = NULL;
        int error;
        int had_lock = 0;
 
+       if (nd->flags & LOOKUP_RCU)
+               return -ECHILD;
+
+       parent = dget_parent(dentry);
+       sdp = GFS2_SB(parent->d_inode);
+       dip = GFS2_I(parent->d_inode);
+       inode = dentry->d_inode;
+
        if (inode) {
                if (is_bad_inode(inode))
                        goto invalid;
@@ -100,13 +109,14 @@ fail:
        return 0;
 }
 
-static int gfs2_dhash(struct dentry *dentry, struct qstr *str)
+static int gfs2_dhash(const struct dentry *dentry, const struct inode *inode,
+               struct qstr *str)
 {
        str->hash = gfs2_disk_hash(str->name, str->len);
        return 0;
 }
 
-static int gfs2_dentry_delete(struct dentry *dentry)
+static int gfs2_dentry_delete(const struct dentry *dentry)
 {
        struct gfs2_inode *ginode;