View | Details | Raw Unified | Return to bug 205938 | Differences between
and this patch

Collapse All | Expand All

(-)b/sys/fs/ext2fs/ext2_bmap.c (-7 / +13 lines)
Lines 96-101 ext4_bmapext(struct vnode *vp, int32_t bn, int64_t *bnp, int *runp, int *runb) Link Here
96
	struct ext4_extent *ep;
96
	struct ext4_extent *ep;
97
	struct ext4_extent_path path = { .ep_bp = NULL };
97
	struct ext4_extent_path path = { .ep_bp = NULL };
98
	daddr_t lbn;
98
	daddr_t lbn;
99
	int ret = 0;
99
100
100
	ip = VTOI(vp);
101
	ip = VTOI(vp);
101
	fs = ip->i_e2fs;
102
	fs = ip->i_e2fs;
Lines 113-127 ext4_bmapext(struct vnode *vp, int32_t bn, int64_t *bnp, int *runp, int *runb) Link Here
113
	ext4_ext_find_extent(fs, ip, lbn, &path);
114
	ext4_ext_find_extent(fs, ip, lbn, &path);
114
	ep = path.ep_ext;
115
	ep = path.ep_ext;
115
	if (ep == NULL)
116
	if (ep == NULL)
116
		return (EIO);
117
		ret = EIO;
118
	else {
119
		*bnp = fsbtodb(fs, lbn - ep->e_blk +
120
		    (ep->e_start_lo | (daddr_t)ep->e_start_hi << 32));
117
121
118
	*bnp = fsbtodb(fs, lbn - ep->e_blk +
122
		if (*bnp == 0)
119
	    (ep->e_start_lo | (daddr_t)ep->e_start_hi << 32));
123
			*bnp = -1;
124
	}
120
125
121
	if (*bnp == 0)
126
	if (path.ep_bp != NULL) {
122
		*bnp = -1;
127
		brelse(path.ep_bp);
128
		path.ep_bp = NULL;
129
	}
123
130
124
	return (0);
131
	return (ret);
125
}
132
}
126
133
127
/*
134
/*
128
- 

Return to bug 205938