xfs
[Top] [All Lists]

[PATCH]xfs: Fix xfs_swap_extents() after removal of xfs_flushinval_pages

To: Dave Chinner <david@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
Subject: [PATCH]xfs: Fix xfs_swap_extents() after removal of xfs_flushinval_pages()
From: Torsten Kaiser <just.for.lkml@xxxxxxxxxxxxxx>
Date: Sun, 20 Jan 2013 10:24:49 +0100
Cc: linux-kernel@xxxxxxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:from:to:cc:subject:message-id:x-mailer:mime-version :content-type:content-transfer-encoding; bh=SVSpx/VxRxNa8Oe2LeEBGyyRUl943NvBe7z62JKrV14=; b=PDSvTYSJM9I3o5FmPbIMtY7SpHvb323zCULD42SEeKUVWapu3g608aPw111WUll7Rh LFeRHfN+GcyuB+XUzfFW+IWqCbhHf3RKEAZeIYTCuYbixZGuXC5UXOwF0n16ohpnqvQk xdqJk+6L2a0rPzh3uIkplcbsXTccUv0jMVcy2SX2HXzupgAnaEOWtG6VSxI/RuqVZyyF 3YY8ORrl01Yus5RGPi6j8Mg1YngcHis6tevoRfBKMesXRvMoE4uaOSdS028KLG72vJk7 ao3P+jrzQLdbSI9Am8+ANbaTHOHQ1Tpr9QP3AU8l1NKVxOTK0Q6LnxrmrC8tp0p9ZcrC HmtA==
From: Torsten Kaiser <just.for.lkml@xxxxxxxxxxxxxx>

Commit fb59581404ab7ec5075299065c22cb211a9262a9 removed
xfs_flushinval_pages() and changed its callers to use
filemap_write_and_wait() and  truncate_pagecache_range() directly.

But in xfs_swap_extents() this change accidental switched the argument
for 'tip' to 'ip'. This patch switches it back to 'tip'

Signed-off-by: Torsten Kaiser <just.for.lkml@xxxxxxxxxxxxxx>

--- a/fs/xfs/xfs_dfrag.c
+++ b/fs/xfs/xfs_dfrag.c
@@ -246,10 +246,10 @@ xfs_swap_extents(
                goto out_unlock;
        }
 
-       error = -filemap_write_and_wait(VFS_I(ip)->i_mapping);
+       error = -filemap_write_and_wait(VFS_I(tip)->i_mapping);
        if (error)
                goto out_unlock;
-       truncate_pagecache_range(VFS_I(ip), 0, -1);
+       truncate_pagecache_range(VFS_I(tip), 0, -1);
 
        /* Verify O_DIRECT for ftmp */
        if (VN_CACHED(VFS_I(tip)) != 0) {

<Prev in Thread] Current Thread [Next in Thread>