Skip to content

Commit 9ae3242

Browse files
committed
GFS2: Remove two unused variables
The two variables being initialised in gfs2_inplace_reserve to track the file & line number of the caller are never used, so we might as well remove them. If something does go wrong, then a stack trace is probably more useful anyway. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
1 parent 891a8e9 commit 9ae3242

3 files changed

Lines changed: 4 additions & 20 deletions

File tree

‎fs/gfs2/incore.h‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ struct gfs2_glock {
246246

247247
struct gfs2_alloc {
248248
/* Quota stuff */
249-
250249
struct gfs2_quota_data *al_qd[2*MAXQUOTAS];
251250
struct gfs2_holder al_qd_ghs[2*MAXQUOTAS];
252251
unsigned int al_qd_num;
@@ -255,9 +254,6 @@ struct gfs2_alloc {
255254
u32 al_alloced; /* Filled in by gfs2_alloc_*() */
256255

257256
/* Filled in by gfs2_inplace_reserve() */
258-
259-
unsigned int al_line;
260-
char *al_file;
261257
struct gfs2_holder al_rgd_gh;
262258
};
263259

‎fs/gfs2/rgrp.c‎

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,14 +1024,13 @@ static int get_local_rgrp(struct gfs2_inode *ip, u64 *last_unlinked)
10241024
}
10251025

10261026
/**
1027-
* gfs2_inplace_reserve_i - Reserve space in the filesystem
1027+
* gfs2_inplace_reserve - Reserve space in the filesystem
10281028
* @ip: the inode to reserve space for
10291029
*
10301030
* Returns: errno
10311031
*/
10321032

1033-
int gfs2_inplace_reserve_i(struct gfs2_inode *ip,
1034-
char *file, unsigned int line)
1033+
int gfs2_inplace_reserve(struct gfs2_inode *ip)
10351034
{
10361035
struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
10371036
struct gfs2_alloc *al = ip->i_alloc;
@@ -1057,14 +1056,7 @@ int gfs2_inplace_reserve_i(struct gfs2_inode *ip,
10571056
gfs2_log_flush(sdp, NULL);
10581057
} while (tries++ < 3);
10591058

1060-
if (error)
1061-
return error;
1062-
1063-
/* no error, so we have the rgrp set in the inode's allocation. */
1064-
al->al_file = file;
1065-
al->al_line = line;
1066-
1067-
return 0;
1059+
return error;
10681060
}
10691061

10701062
/**

‎fs/gfs2/rgrp.h‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,7 @@ static inline void gfs2_alloc_put(struct gfs2_inode *ip)
3636
ip->i_alloc = NULL;
3737
}
3838

39-
extern int gfs2_inplace_reserve_i(struct gfs2_inode *ip,
40-
char *file, unsigned int line);
41-
#define gfs2_inplace_reserve(ip) \
42-
gfs2_inplace_reserve_i((ip), __FILE__, __LINE__)
43-
39+
extern int gfs2_inplace_reserve(struct gfs2_inode *ip);
4440
extern void gfs2_inplace_release(struct gfs2_inode *ip);
4541

4642
extern int gfs2_alloc_block(struct gfs2_inode *ip, u64 *bn, unsigned int *n);

0 commit comments

Comments
 (0)