cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 5/5] GFS2: Check for glock already held in gfs2_getxattr
Date: Mon, 19 Aug 2013 09:48:07 +0100	[thread overview]
Message-ID: <1376902087-7783-6-git-send-email-swhiteho@redhat.com> (raw)
In-Reply-To: <1376902087-7783-1-git-send-email-swhiteho@redhat.com>

Since the introduction of atomic_open, gfs2_getxattr can be
called with the glock already held, so we need to allow for
this.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Reported-by: David Teigland <teigland@redhat.com>
Tested-by: David Teigland <teigland@redhat.com>

diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index a01b8fd..64915ee 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -1750,6 +1750,10 @@ static ssize_t gfs2_getxattr(struct dentry *dentry, const char *name,
 	struct gfs2_holder gh;
 	int ret;
 
+	/* For selinux during lookup */
+	if (gfs2_glock_is_locked_by_me(ip->i_gl))
+		return generic_getxattr(dentry, name, data, size);
+
 	gfs2_holder_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &gh);
 	ret = gfs2_glock_nq(&gh);
 	if (ret == 0) {
-- 
1.7.4



      parent reply	other threads:[~2013-08-19  8:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-19  8:48 [Cluster-devel] GFS2: Pre-pull patch posting (fixes) Steven Whitehouse
2013-08-19  8:48 ` [Cluster-devel] [PATCH 1/5] GFS2: Fix typo in gfs2_create_inode() Steven Whitehouse
2013-08-19  8:48 ` [Cluster-devel] [PATCH 2/5] GFS2: WQ_NON_REENTRANT is meaningless and going away Steven Whitehouse
2013-08-19  8:48 ` [Cluster-devel] [PATCH 3/5] GFS2: don't overrun reserved revokes Steven Whitehouse
2013-08-19  8:48 ` [Cluster-devel] [PATCH 4/5] GFS2: alloc_workqueue() doesn't return an ERR_PTR Steven Whitehouse
2013-08-19  8:48 ` Steven Whitehouse [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1376902087-7783-6-git-send-email-swhiteho@redhat.com \
    --to=swhiteho@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).