]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/gfs2/ops_dentry.c
fat: Fix _fat_bmap() race
[linux-2.6-omap-h63xx.git] / fs / gfs2 / ops_dentry.c
index 793e334d098e19518957371c116f8d9c6f75178d..4a5e676b44209babba9d3142046f23afedce78e1 100644 (file)
@@ -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)