Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-block.git] / fs / gfs2 / ops_dentry.c
index 793e334d098e19518957371c116f8d9c6f75178d..c2ad36330ca3446707668c69731e791c9d1cb615 100644 (file)
@@ -19,7 +19,7 @@
 #include "incore.h"
 #include "dir.h"
 #include "glock.h"
-#include "ops_dentry.h"
+#include "super.h"
 #include "util.h"
 #include "inode.h"
 
@@ -43,7 +43,7 @@ static int gfs2_drevalidate(struct dentry *dentry, struct nameidata *nd)
        struct gfs2_holder d_gh;
        struct gfs2_inode *ip = NULL;
        int error;
-       int had_lock=0;
+       int had_lock = 0;
 
        if (inode) {
                if (is_bad_inode(inode))
@@ -54,7 +54,7 @@ static int gfs2_drevalidate(struct dentry *dentry, struct nameidata *nd)
        if (sdp->sd_args.ar_localcaching)
                goto valid;
 
-       had_lock = gfs2_glock_is_locked_by_me(dip->i_gl);
+       had_lock = (gfs2_glock_is_locked_by_me(dip->i_gl) != NULL);
        if (!had_lock) {
                error = gfs2_glock_nq_init(dip->i_gl, LM_ST_SHARED, 0, &d_gh);
                if (error)