From: Marcin Slusarz <marcin.slusarz@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Jan Kara <jack@suse.cz>
Subject: [PATCH] udf: fix udf_add_free_space
Date: Sun, 10 Feb 2008 20:27:33 +0100 [thread overview]
Message-ID: <20080210192721.GA9979@joi> (raw)
in commit 742ba02a51c8d0bf5446b154531179760c1ed0a2
(udf: create common function for changing free space counter)
by accident I reversed safety condition which lead to
null pointer dereference in case of media error
and wrong counting of free space in normal situation
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Jan Kara <jack@suse.cz>
---
fs/udf/balloc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/udf/balloc.c b/fs/udf/balloc.c
index a95fcfe..1b809bd 100644
--- a/fs/udf/balloc.c
+++ b/fs/udf/balloc.c
@@ -145,7 +145,7 @@ static bool udf_add_free_space(struct udf_sb_info *sbi,
{
struct logicalVolIntegrityDesc *lvid;
- if (sbi->s_lvid_bh)
+ if (sbi->s_lvid_bh == NULL)
return false;
lvid = (struct logicalVolIntegrityDesc *)sbi->s_lvid_bh->b_data;
--
1.5.3.7
next reply other threads:[~2008-02-10 19:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-10 19:27 Marcin Slusarz [this message]
2008-02-10 20:00 ` [PATCH] udf: fix udf_add_free_space Cyrill Gorcunov
2008-02-10 20:06 ` Cyrill Gorcunov
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=20080210192721.GA9979@joi \
--to=marcin.slusarz@gmail.com \
--cc=jack@suse.cz \
--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 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.