mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ashish Sangwan <ashishsangwan2@gmail.com>
To: Jan Kara <jack@suse.cz>
Cc: linux-kernel@vger.kernel.org,
	Ashish Sangwan <ashish.sangwan2@gmail.com>,
	Namjae Jeon <linkinjeon@gmail.com>
Subject: [PATCH] UDF: During mount free lvid_bh before rescanning with different blocksize
Date: Sat, 21 Jul 2012 16:35:17 +0530	[thread overview]
Message-ID: <1342868717-1712-1-git-send-email-ashish.sangwan2@gmail.com> (raw)

If s_lvid_bh is not freed and set to NULL before re-scanning partition 
with default block size, we might end up using wrong lvid in case
s_lvid_bh is not updated in udf_load_logicalvolint during rescan.

Signed-off-by: Ashish Sangwan <ashish.sangwan2@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>

---
 fs/udf/super.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/udf/super.c b/fs/udf/super.c
index ac8a348..4a95c56 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -1961,6 +1961,8 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent)
 			if (!silent)
 				pr_notice("Rescanning with blocksize %d\n",
 					  UDF_DEFAULT_BLOCKSIZE);
+			brelse(sbi->s_lvid_bh);
+			sbi->s_lvid_bh = NULL;
 			uopt.blocksize = UDF_DEFAULT_BLOCKSIZE;
 			ret = udf_load_vrs(sb, &uopt, silent, &fileset);
 		}
-- 
1.7.2.3


             reply	other threads:[~2012-07-21 11:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-21 11:05 Ashish Sangwan [this message]
2012-08-12  4:03 ` Namjae Jeon
2012-08-14 13:25 ` Jan Kara
2012-08-15  4:44   ` Ashish Sangwan

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=1342868717-1712-1-git-send-email-ashish.sangwan2@gmail.com \
    --to=ashishsangwan2@gmail.com \
    --cc=ashish.sangwan2@gmail.com \
    --cc=jack@suse.cz \
    --cc=linkinjeon@gmail.com \
    --cc=linux-kernel@vger.kernel.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 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®