]> err.no Git - linux-2.6/blobdiff - fs/gfs2/glock.h
ocfs2/dlm: Create slabcaches for lock and lockres
[linux-2.6] / fs / gfs2 / glock.h
index f7a8e626aa08ed7111ecc6e6075788048d6b78cb..2f9c6d136b37a860a790367a35e02c2e59d47130 100644 (file)
@@ -26,6 +26,7 @@
 #define GL_SKIP                        0x00000100
 #define GL_ATIME               0x00000200
 #define GL_NOCACHE             0x00000400
+#define GL_FLOCK               0x00000800
 #define GL_NOCANCEL            0x00001000
 
 #define GLR_TRYFAILED          13
@@ -35,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;
                }