diff options
Diffstat (limited to 'fs/gfs2/dentry.c')
-rw-r--r-- | fs/gfs2/dentry.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/fs/gfs2/dentry.c b/fs/gfs2/dentry.c index 50497f65763b..4a456338b873 100644 --- a/fs/gfs2/dentry.c +++ b/fs/gfs2/dentry.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/completion.h> | 11 | #include <linux/completion.h> |
12 | #include <linux/buffer_head.h> | 12 | #include <linux/buffer_head.h> |
13 | #include <linux/gfs2_ondisk.h> | 13 | #include <linux/gfs2_ondisk.h> |
14 | #include <linux/namei.h> | ||
14 | #include <linux/crc32.h> | 15 | #include <linux/crc32.h> |
15 | 16 | ||
16 | #include "gfs2.h" | 17 | #include "gfs2.h" |
@@ -34,15 +35,23 @@ | |||
34 | 35 | ||
35 | static int gfs2_drevalidate(struct dentry *dentry, struct nameidata *nd) | 36 | static int gfs2_drevalidate(struct dentry *dentry, struct nameidata *nd) |
36 | { | 37 | { |
37 | struct dentry *parent = dget_parent(dentry); | 38 | struct dentry *parent; |
38 | struct gfs2_sbd *sdp = GFS2_SB(parent->d_inode); | 39 | struct gfs2_sbd *sdp; |
39 | struct gfs2_inode *dip = GFS2_I(parent->d_inode); | 40 | struct gfs2_inode *dip; |
40 | struct inode *inode = dentry->d_inode; | 41 | struct inode *inode; |
41 | struct gfs2_holder d_gh; | 42 | struct gfs2_holder d_gh; |
42 | struct gfs2_inode *ip = NULL; | 43 | struct gfs2_inode *ip = NULL; |
43 | int error; | 44 | int error; |
44 | int had_lock = 0; | 45 | int had_lock = 0; |
45 | 46 | ||
47 | if (nd->flags & LOOKUP_RCU) | ||
48 | return -ECHILD; | ||
49 | |||
50 | parent = dget_parent(dentry); | ||
51 | sdp = GFS2_SB(parent->d_inode); | ||
52 | dip = GFS2_I(parent->d_inode); | ||
53 | inode = dentry->d_inode; | ||
54 | |||
46 | if (inode) { | 55 | if (inode) { |
47 | if (is_bad_inode(inode)) | 56 | if (is_bad_inode(inode)) |
48 | goto invalid; | 57 | goto invalid; |