]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'master' of git://git.kernel.org/pub/scm/fs/xfs/xfs
authorFelix Blyakher <felixb@sgi.com>
Thu, 12 Feb 2009 21:06:27 +0000 (15:06 -0600)
committerFelix Blyakher <felixb@sgi.com>
Thu, 12 Feb 2009 21:06:27 +0000 (15:06 -0600)
fs/xfs/xfs_dfrag.c
fs/xfs/xfs_log.c

index ac96ab9f70a22b1cd6ce94bac55d903bcb43b2c9..e6d839bddbf008b3bc522720e5f5e0711a954e10 100644 (file)
@@ -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);
 
index 493c07f6a99acd7fca94951e77aa50b3988ef7e1..c8f300897728efc0c3b003ca7fda45cb00e30de1 100644 (file)
@@ -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;
 
@@ -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