Skip to content

Commit

Permalink
Merge branch 'master' of git://git.kernel.org/pub/scm/fs/xfs/xfs
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix Blyakher committed Feb 12, 2009
2 parents b747664 + 7c8f7af commit 8aa4349
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
6 changes: 6 additions & 0 deletions fs/xfs/xfs_dfrag.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ xfs_swapext(
goto out_put_target_file;
}

if (IS_SWAPFILE(file->f_path.dentry->d_inode) ||
IS_SWAPFILE(target_file->f_path.dentry->d_inode)) {
error = XFS_ERROR(EINVAL);
goto out_put_target_file;
}

ip = XFS_I(file->f_path.dentry->d_inode);
tip = XFS_I(target_file->f_path.dentry->d_inode);

Expand Down
14 changes: 8 additions & 6 deletions fs/xfs/xfs_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ xfs_log_mount(
error = xfs_trans_ail_init(mp);
if (error) {
cmn_err(CE_WARN, "XFS: AIL initialisation failed: error %d", error);
goto error;
goto out_free_log;
}
mp->m_log->l_ailp = mp->m_ail;

Expand All @@ -594,20 +594,22 @@ xfs_log_mount(
mp->m_flags |= XFS_MOUNT_RDONLY;
if (error) {
cmn_err(CE_WARN, "XFS: log mount/recovery failed: error %d", error);
goto error;
goto out_destroy_ail;
}
}

/* Normal transactions can now occur */
mp->m_log->l_flags &= ~XLOG_ACTIVE_RECOVERY;

/* End mounting message in xfs_log_mount_finish */
return 0;
error:
xfs_log_unmount_dealloc(mp);

out_destroy_ail:
xfs_trans_ail_destroy(mp);
out_free_log:
xlog_dealloc_log(mp->m_log);
out:
return error;
} /* xfs_log_mount */
}

/*
* Finish the recovery of the file system. This is separate from
Expand Down

0 comments on commit 8aa4349

Please sign in to comment.