mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Bart Trojanowski <bart@jukie.net>
Cc: linux-kernel@vger.kernel.org, Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH] make lock_super recursive to simulate BKL
Date: Tue, 19 Aug 2008 15:21:21 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.1.10.0808191517591.3324@nehalem.linux-foundation.org> (raw)
In-Reply-To: <1219183590-19529-1-git-send-email-bart@jukie.net>



On Tue, 19 Aug 2008, Bart Trojanowski wrote:
>
> This fixes a regression introduced when BKL was removed from the
> vfat driver in commit 8f5934278d1d86590244c2791b28f77d67466007.

I agree that it's going to almost certainly fix the regression, but could 
you test the following patch instead as an alternative? I'd rather remove 
the broken recursive lockign than introduce it as an acceptable concept.

		Linus
---
 fs/fat/inode.c |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 6d266d7..80ff338 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -562,26 +562,23 @@ static int fat_write_inode(struct inode *inode, int wait)
 	struct buffer_head *bh;
 	struct msdos_dir_entry *raw_entry;
 	loff_t i_pos;
-	int err = 0;
+	int err;
 
 retry:
 	i_pos = MSDOS_I(inode)->i_pos;
 	if (inode->i_ino == MSDOS_ROOT_INO || !i_pos)
 		return 0;
 
-	lock_super(sb);
 	bh = sb_bread(sb, i_pos >> sbi->dir_per_block_bits);
 	if (!bh) {
 		printk(KERN_ERR "FAT: unable to read inode block "
 		       "for updating (i_pos %lld)\n", i_pos);
-		err = -EIO;
-		goto out;
+		return -EIO;
 	}
 	spin_lock(&sbi->inode_hash_lock);
 	if (i_pos != MSDOS_I(inode)->i_pos) {
 		spin_unlock(&sbi->inode_hash_lock);
 		brelse(bh);
-		unlock_super(sb);
 		goto retry;
 	}
 
@@ -607,11 +604,10 @@ retry:
 	}
 	spin_unlock(&sbi->inode_hash_lock);
 	mark_buffer_dirty(bh);
+	err = 0;
 	if (wait)
 		err = sync_dirty_buffer(bh);
 	brelse(bh);
-out:
-	unlock_super(sb);
 	return err;
 }
 

  reply	other threads:[~2008-08-19 22:22 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-19 22:03 vfat BKL/lock_super regression in v2.6.26-rc3-g8f59342 Bart Trojanowski
2008-08-19 22:06 ` [PATCH] make lock_super recursive to simulate BKL Bart Trojanowski
2008-08-19 22:21   ` Linus Torvalds [this message]
2008-08-20  1:14     ` Bart Trojanowski
2008-08-19 22:17 ` vfat BKL/lock_super regression in v2.6.26-rc3-g8f59342 Linus Torvalds
2008-08-20  0:03   ` Bart Trojanowski
2008-08-20  0:11     ` Linus Torvalds
2008-08-20  0:24       ` Bart Trojanowski
2008-08-20  0:18   ` Bart Trojanowski
2008-08-20  0:43     ` Linus Torvalds
2008-08-20  0:56       ` Linus Torvalds
2008-08-20  2:27         ` Bart Trojanowski
2008-08-20 21:23           ` Diego Calleja
2008-08-23  0:54           ` [PATCH] document additional vfat mount options Bart Trojanowski
2008-08-23  2:33             ` Grant Coady
2008-08-23  3:12               ` Bart Trojanowski
2008-08-23  3:14                 ` Bart Trojanowski
2008-08-23  3:27                   ` OGAWA Hirofumi
2008-08-23 13:11                     ` Bart Trojanowski
2008-08-23 14:47                       ` OGAWA Hirofumi
2008-08-23  3:10             ` OGAWA Hirofumi

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=alpine.LFD.1.10.0808191517591.3324@nehalem.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=bart@jukie.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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

all inboxes | Powered by JetHome®