.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* -*- mode: c; c-basic-offset: 8; -*- |
---|
2 | 3 | * vim: noexpandtab sw=8 ts=8 sts=0: |
---|
3 | 4 | * |
---|
.. | .. |
---|
6 | 7 | * Block/Cluster mapping functions |
---|
7 | 8 | * |
---|
8 | 9 | * Copyright (C) 2004 Oracle. All rights reserved. |
---|
9 | | - * |
---|
10 | | - * This program is free software; you can redistribute it and/or |
---|
11 | | - * modify it under the terms of the GNU General Public |
---|
12 | | - * License, version 2, as published by the Free Software Foundation. |
---|
13 | | - * |
---|
14 | | - * This program is distributed in the hope that it will be useful, |
---|
15 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
16 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
17 | | - * General Public License for more details. |
---|
18 | | - * |
---|
19 | | - * You should have received a copy of the GNU General Public |
---|
20 | | - * License along with this program; if not, write to the |
---|
21 | | - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
---|
22 | | - * Boston, MA 021110-1307, USA. |
---|
23 | 10 | */ |
---|
24 | 11 | |
---|
25 | 12 | #include <linux/fs.h> |
---|
.. | .. |
---|
416 | 403 | { |
---|
417 | 404 | int i, ret, tree_height, len; |
---|
418 | 405 | struct ocfs2_dinode *di; |
---|
419 | | - struct ocfs2_extent_block *uninitialized_var(eb); |
---|
| 406 | + struct ocfs2_extent_block *eb; |
---|
420 | 407 | struct ocfs2_extent_list *el; |
---|
421 | 408 | struct ocfs2_extent_rec *rec; |
---|
422 | 409 | struct buffer_head *eb_bh = NULL; |
---|
.. | .. |
---|
603 | 590 | *extent_flags = rec->e_flags; |
---|
604 | 591 | } |
---|
605 | 592 | out: |
---|
606 | | - if (eb_bh) |
---|
607 | | - brelse(eb_bh); |
---|
| 593 | + brelse(eb_bh); |
---|
608 | 594 | return ret; |
---|
609 | 595 | } |
---|
610 | 596 | |
---|
.. | .. |
---|
613 | 599 | unsigned int *extent_flags) |
---|
614 | 600 | { |
---|
615 | 601 | int ret; |
---|
616 | | - unsigned int uninitialized_var(hole_len), flags = 0; |
---|
| 602 | + unsigned int hole_len, flags = 0; |
---|
617 | 603 | struct buffer_head *di_bh = NULL; |
---|
618 | 604 | struct ocfs2_extent_rec rec; |
---|
619 | 605 | |
---|
.. | .. |
---|
747 | 733 | return 0; |
---|
748 | 734 | } |
---|
749 | 735 | |
---|
750 | | -#define OCFS2_FIEMAP_FLAGS (FIEMAP_FLAG_SYNC) |
---|
751 | | - |
---|
752 | 736 | int ocfs2_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, |
---|
753 | 737 | u64 map_start, u64 map_len) |
---|
754 | 738 | { |
---|
.. | .. |
---|
760 | 744 | struct buffer_head *di_bh = NULL; |
---|
761 | 745 | struct ocfs2_extent_rec rec; |
---|
762 | 746 | |
---|
763 | | - ret = fiemap_check_flags(fieinfo, OCFS2_FIEMAP_FLAGS); |
---|
| 747 | + ret = fiemap_prep(inode, fieinfo, map_start, &map_len, 0); |
---|
764 | 748 | if (ret) |
---|
765 | 749 | return ret; |
---|
766 | 750 | |
---|