diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index b677c0e6b9ab..5fdde7d4a393 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -2284,10 +2284,21 @@ static void dump_holder(struct seq_file *seq, const if (gh_owner) comm = gh_owner->comm; } - gfs2_print_dbg(seq, "%s H: s:%s f:%s e:%d p:%ld [%s] %pS\n", - fs_id_buf, state2str(gh->gh_state), - hflags2str(flags_buf, gh->gh_flags, gh->gh_iflags), - gh->gh_error, (long)owner_pid, comm, (void *)gh->gh_ip); + + if(seq){ + gfs2_print_dbg(seq, "%s H: s:%s f:%s e:%d p:%ld [%s] %pS\n", + fs_id_buf, state2str(gh->gh_state), + hflags2str(flags_buf, gh->gh_flags, gh->gh_iflags), + gh->gh_error, (long)owner_pid, comm, (void *)gh->gh_ip); + } + + else{ + gfs2_print_dbg(seq, "%s H: s:%s f:%s e:%d p:%ld [%s] %p\n", + fs_id_buf, state2str(gh->gh_state), + hflags2str(flags_buf, gh->gh_flags, gh->gh_iflags), + gh->gh_error, (long)owner_pid, comm, + (void *)gh->gh_ip); + } rcu_read_unlock(); }