lkml.org 
[lkml]   [2013]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH linux-next] befs: befs_fill_super(): remove unreachable code
Date
befs_sb->num_blocks is of base type u64 which is the same as sector_t.
Therefore, num_blocks can never be larger then the maximum
value of sector_t.

smatch analysis:

fs/befs/linuxvfs.c:851 befs_fill_super() warn: impossible
condition '(befs_sb->num_blocks > ~(0)) => (0-u64max > u64max)'

Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
---
fs/befs/linuxvfs.c | 7 -------
1 file changed, 7 deletions(-)

diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index 2b3bda8..2ce5705 100644
--- a/fs/befs/linuxvfs.c
+++ b/fs/befs/linuxvfs.c
@@ -848,13 +848,6 @@ befs_fill_super(struct super_block *sb, void *data, int silent)
if (befs_check_sb(sb) != BEFS_OK)
goto unacquire_priv_sbp;

- if( befs_sb->num_blocks > ~((sector_t)0) ) {
- befs_error(sb, "blocks count: %Lu "
- "is larger than the host can use",
- befs_sb->num_blocks);
- goto unacquire_priv_sbp;
- }
-
/*
* set up enough so that it can read an inode
* Fill in kernel superblock fields from private sb
--
1.7.9.5


\
 
 \ /
  Last update: 2013-02-12 19:21    [W:0.034 / U:1.684 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site