public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] udf: in scan_anchors() sector_t last[] is unsigned and cannot be negative.
@ 2008-12-02 22:10 Roel Kluin
  2008-12-03 16:40 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2008-12-02 22:10 UTC (permalink / raw)
  To: jack; +Cc: lkml

sector_t last[] is unsigned and cannot be negative.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
Maybe you can suggest a less ugly solution?

diff --git a/fs/udf/super.c b/fs/udf/super.c
index e25e701..d53c6fc 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -721,7 +721,7 @@ static sector_t udf_scan_anchors(struct super_block *sb, sector_t lastblock)
 	 *  however, if the disc isn't closed, it could be 512 */
 
 	for (i = 0; i < ARRAY_SIZE(last); i++) {
-		if (last[i] < 0)
+		if (last[i] > last[0] + 1)
 			continue;
 		if (last[i] >= sb->s_bdev->bd_inode->i_size >>
 				sb->s_blocksize_bits)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-03 16:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-02 22:10 [PATCH] udf: in scan_anchors() sector_t last[] is unsigned and cannot be negative Roel Kluin
2008-12-03 16:40 ` Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox