svn commit: r324759 - head/sys/fs/ext2fs
Fedor Uporov
fsu at FreeBSD.org
Thu Oct 19 16:42:05 UTC 2017
Author: fsu
Date: Thu Oct 19 16:42:03 2017
New Revision: 324759
URL: https://svnweb.freebsd.org/changeset/base/324759
Log:
Fix unused variable + style(9) fixes inside the ext4_ext_find_extent()
Approved by: pfg (mentor)
Reported by: Coverity
CID: 1381754
MFC after: 6 months
Modified:
head/sys/fs/ext2fs/ext2_extents.c
Modified: head/sys/fs/ext2fs/ext2_extents.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_extents.c Thu Oct 19 16:40:17 2017 (r324758)
+++ head/sys/fs/ext2fs/ext2_extents.c Thu Oct 19 16:42:03 2017 (r324759)
@@ -377,11 +377,11 @@ ext4_ext_find_extent(struct inode *ip, daddr_t block,
if (error)
return (error);
- if (!ppath)
+ if (ppath == NULL)
return (EINVAL);
path = *ppath;
- if (!path) {
+ if (path == NULL) {
path = malloc(EXT4_EXT_DEPTH_MAX *
sizeof(struct ext4_extent_path),
M_EXT2EXTENTS, M_WAITOK | M_ZERO);
@@ -1349,7 +1349,7 @@ ext4_ext_rm_leaf(struct inode *ip, struct ext4_extent_
uint64_t start)
{
struct m_ext2fs *fs;
- int depth, credits;
+ int depth;
struct ext4_extent_header *eh;
unsigned int a, b, block, num;
unsigned long ex_blk;
@@ -1402,11 +1402,8 @@ ext4_ext_rm_leaf(struct inode *ip, struct ext4_extent_
("ext4_ext_rm_leaf: bad b"));
}
- credits = EXT4_EXT_DEPTH_MAX;
- if (ex == EXT_FIRST_EXTENT(eh)) {
+ if (ex == EXT_FIRST_EXTENT(eh))
correct_index = 1;
- credits += (ext4_ext_inode_depth(ip)) + 1;
- }
error = ext4_remove_blocks(ip, ex, a, b);
if (error)
More information about the svn-src-all
mailing list