Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
666a2c53
Commit
666a2c53
authored
Jan 18, 2006
by
Steven Whitehouse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[GFS2] Remove unused code from various files
Signed-off-by:
Steven Whitehouse
<
swhiteho@redhat.com
>
parent
c73530a1
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1 addition
and
232 deletions
+1
-232
fs/gfs2/bmap.c
fs/gfs2/bmap.c
+1
-80
fs/gfs2/bmap.h
fs/gfs2/bmap.h
+0
-2
fs/gfs2/dir.c
fs/gfs2/dir.c
+0
-51
fs/gfs2/dir.h
fs/gfs2/dir.h
+0
-2
fs/gfs2/eattr.c
fs/gfs2/eattr.c
+0
-57
fs/gfs2/eattr.h
fs/gfs2/eattr.h
+0
-2
fs/gfs2/util.c
fs/gfs2/util.c
+0
-30
fs/gfs2/util.h
fs/gfs2/util.h
+0
-8
No files found.
fs/gfs2/bmap.c
View file @
666a2c53
...
@@ -999,7 +999,7 @@ static int do_shrink(struct gfs2_inode *ip, uint64_t size,
...
@@ -999,7 +999,7 @@ static int do_shrink(struct gfs2_inode *ip, uint64_t size,
}
}
/**
/**
* gfs2_truncatei - make a file a give size
* gfs2_truncatei - make a file a give
n
size
* @ip: the inode
* @ip: the inode
* @size: the size to make the file
* @size: the size to make the file
* @truncator: function to truncate the last partial block
* @truncator: function to truncate the last partial block
...
@@ -1125,82 +1125,3 @@ int gfs2_write_alloc_required(struct gfs2_inode *ip, uint64_t offset,
...
@@ -1125,82 +1125,3 @@ int gfs2_write_alloc_required(struct gfs2_inode *ip, uint64_t offset,
return
0
;
return
0
;
}
}
/**
* do_gfm - Copy out the dinode/indirect blocks of a file
* @ip: the file
* @dibh: the dinode buffer
* @bh: the indirect buffer we're looking at
* @top: the first pointer in the block
* @bottom: one more than the last pointer in the block
* @height: the height the block is at
* @data: a pointer to a struct gfs2_user_buffer structure
*
* If this is a journaled file, copy out the data too.
*
* Returns: errno
*/
static
int
do_gfm
(
struct
gfs2_inode
*
ip
,
struct
buffer_head
*
dibh
,
struct
buffer_head
*
bh
,
uint64_t
*
top
,
uint64_t
*
bottom
,
unsigned
int
height
,
void
*
data
)
{
struct
gfs2_user_buffer
*
ub
=
(
struct
gfs2_user_buffer
*
)
data
;
int
error
;
error
=
gfs2_add_bh_to_ub
(
ub
,
bh
);
if
(
error
)
return
error
;
if
(
!
S_ISDIR
(
ip
->
i_di
.
di_mode
)
||
height
+
1
!=
ip
->
i_di
.
di_height
)
return
0
;
for
(;
top
<
bottom
;
top
++
)
if
(
*
top
)
{
struct
buffer_head
*
data_bh
;
error
=
gfs2_meta_read
(
ip
->
i_gl
,
be64_to_cpu
(
*
top
),
DIO_START
|
DIO_WAIT
,
&
data_bh
);
if
(
error
)
return
error
;
error
=
gfs2_add_bh_to_ub
(
ub
,
data_bh
);
brelse
(
data_bh
);
if
(
error
)
return
error
;
}
return
0
;
}
/**
* gfs2_get_file_meta - return all the metadata for a file
* @ip: the file
* @ub: the structure representing the meta
*
* Returns: errno
*/
int
gfs2_get_file_meta
(
struct
gfs2_inode
*
ip
,
struct
gfs2_user_buffer
*
ub
)
{
int
error
;
if
(
gfs2_is_stuffed
(
ip
))
{
struct
buffer_head
*
dibh
;
error
=
gfs2_meta_inode_buffer
(
ip
,
&
dibh
);
if
(
!
error
)
{
error
=
gfs2_add_bh_to_ub
(
ub
,
dibh
);
brelse
(
dibh
);
}
}
else
{
struct
metapath
mp
;
find_metapath
(
ip
,
0
,
&
mp
);
error
=
recursive_scan
(
ip
,
NULL
,
&
mp
,
0
,
0
,
1
,
do_gfm
,
ub
);
}
return
error
;
}
fs/gfs2/bmap.h
View file @
666a2c53
...
@@ -34,6 +34,4 @@ void gfs2_write_calc_reserv(struct gfs2_inode *ip, unsigned int len,
...
@@ -34,6 +34,4 @@ void gfs2_write_calc_reserv(struct gfs2_inode *ip, unsigned int len,
int
gfs2_write_alloc_required
(
struct
gfs2_inode
*
ip
,
uint64_t
offset
,
int
gfs2_write_alloc_required
(
struct
gfs2_inode
*
ip
,
uint64_t
offset
,
unsigned
int
len
,
int
*
alloc_required
);
unsigned
int
len
,
int
*
alloc_required
);
int
gfs2_get_file_meta
(
struct
gfs2_inode
*
ip
,
struct
gfs2_user_buffer
*
ub
);
#endif
/* __BMAP_DOT_H__ */
#endif
/* __BMAP_DOT_H__ */
fs/gfs2/dir.c
View file @
666a2c53
...
@@ -2104,54 +2104,3 @@ int gfs2_diradd_alloc_required(struct gfs2_inode *dip, struct qstr *filename,
...
@@ -2104,54 +2104,3 @@ int gfs2_diradd_alloc_required(struct gfs2_inode *dip, struct qstr *filename,
return
error
;
return
error
;
}
}
/**
* do_gdm - copy out one leaf (or list of leaves)
* @dip: the directory
* @index: the hash table offset in the directory
* @len: the number of pointers to this leaf
* @leaf_no: the leaf number
* @data: a pointer to a struct gfs2_user_buffer structure
*
* Returns: errno
*/
static
int
do_gdm
(
struct
gfs2_inode
*
dip
,
uint32_t
index
,
uint32_t
len
,
uint64_t
leaf_no
,
void
*
data
)
{
struct
gfs2_user_buffer
*
ub
=
(
struct
gfs2_user_buffer
*
)
data
;
struct
gfs2_leaf
leaf
;
struct
buffer_head
*
bh
;
uint64_t
blk
;
int
error
=
0
;
for
(
blk
=
leaf_no
;
blk
;
blk
=
leaf
.
lf_next
)
{
error
=
get_leaf
(
dip
,
blk
,
&
bh
);
if
(
error
)
break
;
gfs2_leaf_in
(
&
leaf
,
bh
->
b_data
);
error
=
gfs2_add_bh_to_ub
(
ub
,
bh
);
brelse
(
bh
);
if
(
error
)
break
;
}
return
error
;
}
/**
* gfs2_get_dir_meta - return all the leaf blocks of a directory
* @dip: the directory
* @ub: the structure representing the meta
*
* Returns: errno
*/
int
gfs2_get_dir_meta
(
struct
gfs2_inode
*
dip
,
struct
gfs2_user_buffer
*
ub
)
{
return
foreach_leaf
(
dip
,
do_gdm
,
ub
);
}
fs/gfs2/dir.h
View file @
666a2c53
...
@@ -46,6 +46,4 @@ int gfs2_dir_exhash_dealloc(struct gfs2_inode *dip);
...
@@ -46,6 +46,4 @@ int gfs2_dir_exhash_dealloc(struct gfs2_inode *dip);
int
gfs2_diradd_alloc_required
(
struct
gfs2_inode
*
dip
,
struct
qstr
*
filename
,
int
gfs2_diradd_alloc_required
(
struct
gfs2_inode
*
dip
,
struct
qstr
*
filename
,
int
*
alloc_required
);
int
*
alloc_required
);
int
gfs2_get_dir_meta
(
struct
gfs2_inode
*
ip
,
struct
gfs2_user_buffer
*
ub
);
#endif
/* __DIR_DOT_H__ */
#endif
/* __DIR_DOT_H__ */
fs/gfs2/eattr.c
View file @
666a2c53
...
@@ -1561,60 +1561,3 @@ int gfs2_ea_dealloc(struct gfs2_inode *ip)
...
@@ -1561,60 +1561,3 @@ int gfs2_ea_dealloc(struct gfs2_inode *ip)
return
error
;
return
error
;
}
}
/**
* gfs2_get_eattr_meta - return all the eattr blocks of a file
* @dip: the directory
* @ub: the structure representing the user buffer to copy to
*
* Returns: errno
*/
int
gfs2_get_eattr_meta
(
struct
gfs2_inode
*
ip
,
struct
gfs2_user_buffer
*
ub
)
{
struct
buffer_head
*
bh
;
int
error
;
error
=
gfs2_meta_read
(
ip
->
i_gl
,
ip
->
i_di
.
di_eattr
,
DIO_START
|
DIO_WAIT
,
&
bh
);
if
(
error
)
return
error
;
gfs2_add_bh_to_ub
(
ub
,
bh
);
if
(
ip
->
i_di
.
di_flags
&
GFS2_DIF_EA_INDIRECT
)
{
struct
buffer_head
*
eabh
;
uint64_t
*
eablk
,
*
end
;
if
(
gfs2_metatype_check
(
ip
->
i_sbd
,
bh
,
GFS2_METATYPE_IN
))
{
error
=
-
EIO
;
goto
out
;
}
eablk
=
(
uint64_t
*
)(
bh
->
b_data
+
sizeof
(
struct
gfs2_meta_header
));
end
=
eablk
+
ip
->
i_sbd
->
sd_inptrs
;
for
(;
eablk
<
end
;
eablk
++
)
{
uint64_t
bn
;
if
(
!*
eablk
)
break
;
bn
=
be64_to_cpu
(
*
eablk
);
error
=
gfs2_meta_read
(
ip
->
i_gl
,
bn
,
DIO_START
|
DIO_WAIT
,
&
eabh
);
if
(
error
)
break
;
gfs2_add_bh_to_ub
(
ub
,
eabh
);
brelse
(
eabh
);
if
(
error
)
break
;
}
}
out:
brelse
(
bh
);
return
error
;
}
fs/gfs2/eattr.h
View file @
666a2c53
...
@@ -74,8 +74,6 @@ int gfs2_ea_remove(struct gfs2_inode *ip, struct gfs2_ea_request *er);
...
@@ -74,8 +74,6 @@ int gfs2_ea_remove(struct gfs2_inode *ip, struct gfs2_ea_request *er);
int
gfs2_ea_dealloc
(
struct
gfs2_inode
*
ip
);
int
gfs2_ea_dealloc
(
struct
gfs2_inode
*
ip
);
int
gfs2_get_eattr_meta
(
struct
gfs2_inode
*
ip
,
struct
gfs2_user_buffer
*
ub
);
/* Exported to acl.c */
/* Exported to acl.c */
int
gfs2_ea_find
(
struct
gfs2_inode
*
ip
,
int
gfs2_ea_find
(
struct
gfs2_inode
*
ip
,
...
...
fs/gfs2/util.c
View file @
666a2c53
...
@@ -221,36 +221,6 @@ int gfs2_io_error_bh_i(struct gfs2_sbd *sdp, struct buffer_head *bh,
...
@@ -221,36 +221,6 @@ int gfs2_io_error_bh_i(struct gfs2_sbd *sdp, struct buffer_head *bh,
return
rv
;
return
rv
;
}
}
/**
* gfs2_add_bh_to_ub - copy a buffer up to user space
* @ub: the structure representing where to copy
* @bh: the buffer
*
* Returns: errno
*/
int
gfs2_add_bh_to_ub
(
struct
gfs2_user_buffer
*
ub
,
struct
buffer_head
*
bh
)
{
uint64_t
blkno
=
bh
->
b_blocknr
;
if
(
ub
->
ub_count
+
sizeof
(
uint64_t
)
+
bh
->
b_size
>
ub
->
ub_size
)
return
-
ENOMEM
;
if
(
copy_to_user
(
ub
->
ub_data
+
ub
->
ub_count
,
&
blkno
,
sizeof
(
uint64_t
)))
return
-
EFAULT
;
ub
->
ub_count
+=
sizeof
(
uint64_t
);
if
(
copy_to_user
(
ub
->
ub_data
+
ub
->
ub_count
,
bh
->
b_data
,
bh
->
b_size
))
return
-
EFAULT
;
ub
->
ub_count
+=
bh
->
b_size
;
return
0
;
}
void
gfs2_icbit_munge
(
struct
gfs2_sbd
*
sdp
,
unsigned
char
**
bitmap
,
void
gfs2_icbit_munge
(
struct
gfs2_sbd
*
sdp
,
unsigned
char
**
bitmap
,
unsigned
int
bit
,
int
new_value
)
unsigned
int
bit
,
int
new_value
)
{
{
...
...
fs/gfs2/util.h
View file @
666a2c53
...
@@ -152,14 +152,6 @@ extern kmem_cache_t *gfs2_glock_cachep;
...
@@ -152,14 +152,6 @@ extern kmem_cache_t *gfs2_glock_cachep;
extern
kmem_cache_t
*
gfs2_inode_cachep
;
extern
kmem_cache_t
*
gfs2_inode_cachep
;
extern
kmem_cache_t
*
gfs2_bufdata_cachep
;
extern
kmem_cache_t
*
gfs2_bufdata_cachep
;
struct
gfs2_user_buffer
{
char
__user
*
ub_data
;
unsigned
int
ub_size
;
unsigned
int
ub_count
;
};
int
gfs2_add_bh_to_ub
(
struct
gfs2_user_buffer
*
ub
,
struct
buffer_head
*
bh
);
static
inline
unsigned
int
gfs2_tune_get_i
(
struct
gfs2_tune
*
gt
,
static
inline
unsigned
int
gfs2_tune_get_i
(
struct
gfs2_tune
*
gt
,
unsigned
int
*
p
)
unsigned
int
*
p
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment