X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=fs%2Fgfs2%2Fglock.h;h=2f9c6d136b37a860a790367a35e02c2e59d47130;hb=c523aef0f7284970463ebd77a54bca9069711d4a;hp=b16f604eea9fd6e052ac29b17766f16ad2316adb;hpb=4fa435018d740cb83d74c92306aa1f796da91ddd;p=linux-2.6-omap-h63xx.git diff --git a/fs/gfs2/glock.h b/fs/gfs2/glock.h index b16f604eea9..2f9c6d136b3 100644 --- a/fs/gfs2/glock.h +++ b/fs/gfs2/glock.h @@ -36,11 +36,13 @@ static inline int gfs2_glock_is_locked_by_me(struct gfs2_glock *gl) { struct gfs2_holder *gh; int locked = 0; + struct pid *pid; /* Look in glock's list of holders for one with current task as owner */ spin_lock(&gl->gl_spin); + pid = task_pid(current); list_for_each_entry(gh, &gl->gl_holders, gh_list) { - if (gh->gh_owner_pid == current->pid) { + if (gh->gh_owner_pid == pid) { locked = 1; break; }