All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Mahoney <jeffm@suse.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	Linux Torvalds <torvalds@linux-foundation.org>
Cc: ReiserFS Development Mailing List <reiserfs-devel@vger.kernel.org>
Subject: [patch 1/7] reiserfs: fix up lockdep warnings
Date: Tue, 16 Oct 2007 19:02:11 -0400	[thread overview]
Message-ID: <20071016230258.530307000@suse.com> (raw)
In-Reply-To: 20071016230210.779927000@suse.com

[-- Attachment #1: patches.suse/reiserfs-fix-lockdep-warnings --]
[-- Type: text/plain, Size: 1130 bytes --]

 This patch adds I_MUTEX_XATTR annotations to the inode locking in
 the reiserfs xattr code.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>

---
 fs/reiserfs/xattr.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/fs/reiserfs/xattr.c	2007-10-16 18:52:28.557840914 -0400
+++ b/fs/reiserfs/xattr.c	2007-10-16 18:52:32.258571244 -0400
@@ -478,7 +478,7 @@ reiserfs_xattr_set(struct inode *inode, 
 	/* Resize it so we're ok to write there */
 	newattrs.ia_size = buffer_size;
 	newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME;
-	mutex_lock(&xinode->i_mutex);
+	mutex_lock_nested(&xinode->i_mutex, I_MUTEX_XATTR);
 	err = notify_change(fp->f_path.dentry, &newattrs);
 	if (err)
 		goto out_filp;
@@ -1217,7 +1217,8 @@ int reiserfs_xattr_init(struct super_blo
 		if (!IS_ERR(dentry)) {
 			if (!(mount_flags & MS_RDONLY) && !dentry->d_inode) {
 				struct inode *inode = dentry->d_parent->d_inode;
-				mutex_lock(&inode->i_mutex);
+				mutex_lock_nested(&inode->i_mutex,
+				                  I_MUTEX_XATTR);
 				err = inode->i_op->mkdir(inode, dentry, 0700);
 				mutex_unlock(&inode->i_mutex);
 				if (err) {

-- 


  reply	other threads:[~2007-10-16 23:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-16 23:02 [patch 0/7] reiserfs fixes patch set Jeff Mahoney
2007-10-16 23:02 ` Jeff Mahoney [this message]
2007-10-16 23:02 ` [patch 2/7] reiserfs: dont use BUG when panicking Jeff Mahoney
2007-10-16 23:02 ` [patch 3/7] reiserfs: use is_reusable to catch corruption Jeff Mahoney
2007-10-16 23:02 ` [patch 4/7] reiserfs: fix usage of signed ints for block numbers Jeff Mahoney
2007-10-16 23:02 ` [patch 5/7] reiserfs: fix memset byte count during resize Jeff Mahoney
2007-10-16 23:02 ` [patch 6/7] reiserfs: remove first_zero_hint Jeff Mahoney
2007-10-18 18:02   ` Jeff Mahoney
2007-10-16 23:02 ` [patch 7/7] reiserfs: ignore on disk s_bmap_nr value Jeff Mahoney
2007-10-17 22:19   ` Andrew Morton
2007-10-17 22:11 ` [patch 0/7] reiserfs fixes patch set Andrew Morton
2007-10-17 22:19   ` Linus Torvalds
2007-10-17 23:23   ` Jeff Mahoney

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=20071016230258.530307000@suse.com \
    --to=jeffm@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=reiserfs-devel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.