super.c (fe56097b23b1303b894eefd91582e4a64247d03f) super.c (d796c52ef0b71a988364f6109aeb63d79c5b116b)
1/*
2 * linux/fs/ext4/super.c
3 *
4 * Copyright (C) 1992, 1993, 1994, 1995
5 * Remy Card (card@masi.ibp.fr)
6 * Laboratoire MASI - Institut Blaise Pascal
7 * Universite Pierre et Marie Curie (Paris VI)
8 *

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

321 ref_cnt--;
322 handle = (handle_t *)ref_cnt;
323
324 current->journal_info = handle;
325}
326
327/*
328 * Wrappers for jbd2_journal_start/end.
1/*
2 * linux/fs/ext4/super.c
3 *
4 * Copyright (C) 1992, 1993, 1994, 1995
5 * Remy Card (card@masi.ibp.fr)
6 * Laboratoire MASI - Institut Blaise Pascal
7 * Universite Pierre et Marie Curie (Paris VI)
8 *

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

321 ref_cnt--;
322 handle = (handle_t *)ref_cnt;
323
324 current->journal_info = handle;
325}
326
327/*
328 * Wrappers for jbd2_journal_start/end.
329 *
330 * The only special thing we need to do here is to make sure that all
331 * journal_end calls result in the superblock being marked dirty, so
332 * that sync() will call the filesystem's write_super callback if
333 * appropriate.
329 */
330handle_t *ext4_journal_start_sb(struct super_block *sb, int nblocks)
331{
332 journal_t *journal;
333
334 trace_ext4_journal_start(sb, nblocks, _RET_IP_);
335 if (sb->s_flags & MS_RDONLY)
336 return ERR_PTR(-EROFS);

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

346 */
347 if (is_journal_aborted(journal)) {
348 ext4_abort(sb, "Detected aborted journal");
349 return ERR_PTR(-EROFS);
350 }
351 return jbd2_journal_start(journal, nblocks);
352}
353
334 */
335handle_t *ext4_journal_start_sb(struct super_block *sb, int nblocks)
336{
337 journal_t *journal;
338
339 trace_ext4_journal_start(sb, nblocks, _RET_IP_);
340 if (sb->s_flags & MS_RDONLY)
341 return ERR_PTR(-EROFS);

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

351 */
352 if (is_journal_aborted(journal)) {
353 ext4_abort(sb, "Detected aborted journal");
354 return ERR_PTR(-EROFS);
355 }
356 return jbd2_journal_start(journal, nblocks);
357}
358
359/*
360 * The only special thing we need to do here is to make sure that all
361 * jbd2_journal_stop calls result in the superblock being marked dirty, so
362 * that sync() will call the filesystem's write_super callback if
363 * appropriate.
364 */
354int __ext4_journal_stop(const char *where, unsigned int line, handle_t *handle)
355{
356 struct super_block *sb;
357 int err;
358 int rc;
359
360 if (!ext4_handle_valid(handle)) {
361 ext4_put_nojournal(handle);

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

4414 "from previous mount: %s", errstr);
4415 ext4_warning(sb, "Marking fs in need of filesystem check.");
4416
4417 EXT4_SB(sb)->s_mount_state |= EXT4_ERROR_FS;
4418 es->s_state |= cpu_to_le16(EXT4_ERROR_FS);
4419 ext4_commit_super(sb, 1);
4420
4421 jbd2_journal_clear_err(journal);
365int __ext4_journal_stop(const char *where, unsigned int line, handle_t *handle)
366{
367 struct super_block *sb;
368 int err;
369 int rc;
370
371 if (!ext4_handle_valid(handle)) {
372 ext4_put_nojournal(handle);

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

4425 "from previous mount: %s", errstr);
4426 ext4_warning(sb, "Marking fs in need of filesystem check.");
4427
4428 EXT4_SB(sb)->s_mount_state |= EXT4_ERROR_FS;
4429 es->s_state |= cpu_to_le16(EXT4_ERROR_FS);
4430 ext4_commit_super(sb, 1);
4431
4432 jbd2_journal_clear_err(journal);
4433 jbd2_journal_update_sb_errno(journal);
4422 }
4423}
4424
4425/*
4426 * Force the running and committing transactions to commit,
4427 * and wait on the commit.
4428 */
4429int ext4_force_commit(struct super_block *sb)

--- 898 unchanged lines hidden ---
4434 }
4435}
4436
4437/*
4438 * Force the running and committing transactions to commit,
4439 * and wait on the commit.
4440 */
4441int ext4_force_commit(struct super_block *sb)

--- 898 unchanged lines hidden ---