Skip to content

Commit 8fa9d17

Browse files
goldwynrtorvalds
authored andcommitted
ocfs2: remove unecessary variable needs_checkpoint
Code cleanup: needs_checkpoint is assigned to but never used. Delete the variable. Signed-off-by: Goldwyn Rodrigues <[email protected]> Cc: Jeff Liu <[email protected]> Acked-by: Joel Becker <[email protected]> Cc: Mark Fasheh <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 40c7f2e commit 8fa9d17

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

fs/ocfs2/journal.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ void ocfs2_complete_quota_recovery(struct ocfs2_super *osb);
200200

201201
static inline void ocfs2_start_checkpoint(struct ocfs2_super *osb)
202202
{
203-
atomic_set(&osb->needs_checkpoint, 1);
204203
wake_up(&osb->checkpoint_event);
205204
}
206205

fs/ocfs2/ocfs2.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,6 @@ struct ocfs2_super
347347
struct task_struct *recovery_thread_task;
348348
int disable_recovery;
349349
wait_queue_head_t checkpoint_event;
350-
atomic_t needs_checkpoint;
351350
struct ocfs2_journal *journal;
352351
unsigned long osb_commit_interval;
353352

fs/ocfs2/super.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,9 @@ static int ocfs2_osb_dump(struct ocfs2_super *osb, char *buf, int len)
286286
spin_unlock(&osb->osb_lock);
287287

288288
out += snprintf(buf + out, len - out,
289-
"%10s => Pid: %d Interval: %lu Needs: %d\n", "Commit",
289+
"%10s => Pid: %d Interval: %lu\n", "Commit",
290290
(osb->commit_task ? task_pid_nr(osb->commit_task) : -1),
291-
osb->osb_commit_interval,
292-
atomic_read(&osb->needs_checkpoint));
291+
osb->osb_commit_interval);
293292

294293
out += snprintf(buf + out, len - out,
295294
"%10s => State: %d TxnId: %lu NumTxns: %d\n",
@@ -2154,7 +2153,6 @@ static int ocfs2_initialize_super(struct super_block *sb,
21542153
}
21552154

21562155
init_waitqueue_head(&osb->checkpoint_event);
2157-
atomic_set(&osb->needs_checkpoint, 0);
21582156

21592157
osb->s_atime_quantum = OCFS2_DEFAULT_ATIME_QUANTUM;
21602158

0 commit comments

Comments
 (0)