Skip to content

Commit 56409ab

Browse files
committed
[GFS2] Remove some unused code
Remove some of the unused code flagged up by Adrian Bunk. Cc: Adrian Bunk <bunk@stusta.de> Signed-off-by: Steven Whitehouse
1 parent bac1e07 commit 56409ab

5 files changed

Lines changed: 0 additions & 315 deletions

File tree

‎fs/gfs2/bmap.c‎

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -48,37 +48,6 @@ struct strip_mine {
4848
unsigned int sm_height;
4949
};
5050

51-
/**
52-
* @gfs2_unstuffer_sync - Synchronously unstuff a dinode
53-
* @ip:
54-
* @dibh:
55-
* @block:
56-
* @private:
57-
*
58-
* Cheat and use a metadata buffer instead of a data page.
59-
*
60-
* Returns: errno
61-
*/
62-
#if 0
63-
int gfs2_unstuffer_sync(struct gfs2_inode *ip, struct buffer_head *dibh,
64-
uint64_t block, void *private)
65-
{
66-
struct buffer_head *bh;
67-
int error;
68-
69-
bh = gfs2_meta_new(ip->i_gl, block);
70-
71-
gfs2_buffer_copy_tail(bh, 0, dibh, sizeof(struct gfs2_dinode));
72-
73-
set_buffer_dirty(bh);
74-
error = sync_dirty_buffer(bh);
75-
76-
brelse(bh);
77-
78-
return error;
79-
}
80-
#endif /* 0 */
81-
8251
/**
8352
* gfs2_unstuff_dinode - Unstuff a dinode when the data has grown too big
8453
* @ip: The GFS2 inode to unstuff

‎fs/gfs2/eattr.c‎

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -358,33 +358,6 @@ static int ea_remove_unstuffed(struct gfs2_inode *ip, struct buffer_head *bh,
358358
return error;
359359
}
360360

361-
#if 0
362-
363-
static int gfs2_ea_repack_i(struct gfs2_inode *ip)
364-
{
365-
return -EOPNOTSUPP;
366-
}
367-
368-
int gfs2_ea_repack(struct gfs2_inode *ip)
369-
{
370-
struct gfs2_holder gh;
371-
int error;
372-
373-
error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh);
374-
if (error)
375-
return error;
376-
377-
/* Some sort of permissions checking would be nice */
378-
379-
error = gfs2_ea_repack_i(ip);
380-
381-
gfs2_glock_dq_uninit(&gh);
382-
383-
return error;
384-
}
385-
386-
#endif /* 0 */
387-
388361
struct ea_list {
389362
struct gfs2_ea_request *ei_er;
390363
unsigned int ei_size;

‎fs/gfs2/glock.c‎

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,29 +1328,6 @@ static void gfs2_glock_prefetch(struct gfs2_glock *gl, unsigned int state,
13281328
glops->go_xmote_th(gl, state, flags);
13291329
}
13301330

1331-
/**
1332-
* gfs2_glock_force_drop - Force a glock to be uncached
1333-
* @gl: the glock
1334-
*
1335-
*/
1336-
#if 0
1337-
void gfs2_glock_force_drop(struct gfs2_glock *gl)
1338-
{
1339-
struct gfs2_holder gh;
1340-
1341-
gfs2_holder_init(gl, LM_ST_UNLOCKED, 0, &gh);
1342-
set_bit(HIF_DEMOTE, &gh.gh_iflags);
1343-
1344-
spin_lock(&gl->gl_spin);
1345-
list_add_tail(&gh.gh_list, &gl->gl_waiters2);
1346-
run_queue(gl);
1347-
spin_unlock(&gl->gl_spin);
1348-
1349-
wait_for_completion(&gh.gh_wait);
1350-
gfs2_holder_uninit(&gh);
1351-
}
1352-
#endif /* 0 */
1353-
13541331
static void greedy_work(void *data)
13551332
{
13561333
struct greedy *gr = data;

‎fs/gfs2/lvb.c‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,4 @@ void gfs2_quota_lvb_out(struct gfs2_quota_lvb *qb, char *lvb)
4343
str->qb_value = cpu_to_be64(qb->qb_value);
4444
}
4545

46-
#if 0
47-
void gfs2_quota_lvb_print(struct gfs2_quota_lvb *qb)
48-
{
49-
pv(qb, qb_magic, "%u");
50-
pv(qb, qb_limit, "%llu");
51-
pv(qb, qb_warn, "%llu");
52-
pv(qb, qb_value, "%lld");
53-
}
54-
#endif /* 0 */
5546

0 commit comments

Comments
 (0)