journal.c (0ee66ddcf3c1503a9bdb3e49a7a96c6e429ddfad) journal.c (480f89d553260e7823920e687846877bebc8dca0)
1// SPDX-License-Identifier: GPL-2.0+
2/*
3 * linux/fs/jbd2/journal.c
4 *
5 * Written by Stephen C. Tweedie <sct@redhat.com>, 1998
6 *
7 * Copyright 1998 Red Hat corp --- All Rights Reserved
8 *

--- 720 unchanged lines hidden (view full) ---

729{
730 /*
731 * Fast commits only allowed if at least one full commit has
732 * been processed.
733 */
734 if (!journal->j_stats.ts_tid)
735 return -EINVAL;
736
1// SPDX-License-Identifier: GPL-2.0+
2/*
3 * linux/fs/jbd2/journal.c
4 *
5 * Written by Stephen C. Tweedie <sct@redhat.com>, 1998
6 *
7 * Copyright 1998 Red Hat corp --- All Rights Reserved
8 *

--- 720 unchanged lines hidden (view full) ---

729{
730 /*
731 * Fast commits only allowed if at least one full commit has
732 * been processed.
733 */
734 if (!journal->j_stats.ts_tid)
735 return -EINVAL;
736
737 if (tid <= journal->j_commit_sequence)
737 write_lock(&journal->j_state_lock);
738 if (tid <= journal->j_commit_sequence) {
739 write_unlock(&journal->j_state_lock);
738 return -EALREADY;
740 return -EALREADY;
741 }
739
742
740 write_lock(&journal->j_state_lock);
741 if (journal->j_flags & JBD2_FULL_COMMIT_ONGOING ||
742 (journal->j_flags & JBD2_FAST_COMMIT_ONGOING)) {
743 DEFINE_WAIT(wait);
744
745 prepare_to_wait(&journal->j_fc_wait, &wait,
746 TASK_UNINTERRUPTIBLE);
747 write_unlock(&journal->j_state_lock);
748 schedule();

--- 2263 unchanged lines hidden ---
743 if (journal->j_flags & JBD2_FULL_COMMIT_ONGOING ||
744 (journal->j_flags & JBD2_FAST_COMMIT_ONGOING)) {
745 DEFINE_WAIT(wait);
746
747 prepare_to_wait(&journal->j_fc_wait, &wait,
748 TASK_UNINTERRUPTIBLE);
749 write_unlock(&journal->j_state_lock);
750 schedule();

--- 2263 unchanged lines hidden ---