* [PATCH] udf: fix udf_add_free_space
@ 2008-02-10 19:27 Marcin Slusarz
2008-02-10 20:00 ` Cyrill Gorcunov
0 siblings, 1 reply; 3+ messages in thread
From: Marcin Slusarz @ 2008-02-10 19:27 UTC (permalink / raw)
To: LKML; +Cc: Jan Kara
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
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] udf: fix udf_add_free_space
2008-02-10 19:27 [PATCH] udf: fix udf_add_free_space Marcin Slusarz
@ 2008-02-10 20:00 ` Cyrill Gorcunov
2008-02-10 20:06 ` Cyrill Gorcunov
0 siblings, 1 reply; 3+ messages in thread
From: Cyrill Gorcunov @ 2008-02-10 20:00 UTC (permalink / raw)
To: Marcin Slusarz; +Cc: LKML, Jan Kara
[Marcin Slusarz - Sun, Feb 10, 2008 at 08:27:33PM +0100]
| 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;
| --
Marcin, actually you've confused me - i always thought the second case
is the explicit form of the first ;)
- Cyrill -
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] udf: fix udf_add_free_space
2008-02-10 20:00 ` Cyrill Gorcunov
@ 2008-02-10 20:06 ` Cyrill Gorcunov
0 siblings, 0 replies; 3+ messages in thread
From: Cyrill Gorcunov @ 2008-02-10 20:06 UTC (permalink / raw)
To: Marcin Slusarz, LKML, Jan Kara
[Cyrill Gorcunov - Sun, Feb 10, 2008 at 11:00:52PM +0300]
| [Marcin Slusarz - Sun, Feb 10, 2008 at 08:27:33PM +0100]
| | 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;
| | --
|
| Marcin, actually you've confused me - i always thought the second case
| is the explicit form of the first ;)
|
oh my, it seems i've to go sleep RIGHT NOW - 'cause I'm skipping
self-obvious things, damn...
Marcin, all is OK - drop my message ;)
- Cyrill -
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-02-10 20:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-10 19:27 [PATCH] udf: fix udf_add_free_space Marcin Slusarz
2008-02-10 20:00 ` Cyrill Gorcunov
2008-02-10 20:06 ` Cyrill Gorcunov
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.