lkml.org 
[lkml]   [2008]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] udf: in scan_anchors() sector_t last[] is unsigned and cannot be negative.
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)


\
 
 \ /
  Last update: 2008-12-02 23:13    [W:0.029 / U:0.856 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site