summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0118-xfs-fix-endian-conversion-issue-in-discard-code.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0118-xfs-fix-endian-conversion-issue-in-discard-code.patch')
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0118-xfs-fix-endian-conversion-issue-in-discard-code.patch45
1 files changed, 0 insertions, 45 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0118-xfs-fix-endian-conversion-issue-in-discard-code.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0118-xfs-fix-endian-conversion-issue-in-discard-code.patch
deleted file mode 100644
index 6a0feaa8..00000000
--- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0118-xfs-fix-endian-conversion-issue-in-discard-code.patch
+++ /dev/null
@@ -1,45 +0,0 @@
1From 1075b6106024e51af7a5108626091322d2e91710 Mon Sep 17 00:00:00 2001
2From: Dave Chinner <dchinner@redhat.com>
3Date: Wed, 18 Jan 2012 14:41:45 -0600
4Subject: [PATCH 118/129] xfs: fix endian conversion issue in discard code
5
6commit b1c770c273a4787069306fc82aab245e9ac72e9d upstream
7
8When finding the longest extent in an AG, we read the value directly
9out of the AGF buffer without endian conversion. This will give an
10incorrect length, resulting in FITRIM operations potentially not
11trimming everything that it should.
12
13Signed-off-by: Dave Chinner <dchinner@redhat.com>
14Reviewed-by: Christoph Hellwig <hch@lst.de>
15Signed-off-by: Ben Myers <bpm@sgi.com>
16Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17---
18 fs/xfs/xfs_discard.c | 4 ++--
19 1 file changed, 2 insertions(+), 2 deletions(-)
20
21diff --git a/fs/xfs/xfs_discard.c b/fs/xfs/xfs_discard.c
22index 8a24f0c..286a051 100644
23--- a/fs/xfs/xfs_discard.c
24+++ b/fs/xfs/xfs_discard.c
25@@ -68,7 +68,7 @@ xfs_trim_extents(
26 * Look up the longest btree in the AGF and start with it.
27 */
28 error = xfs_alloc_lookup_le(cur, 0,
29- XFS_BUF_TO_AGF(agbp)->agf_longest, &i);
30+ be32_to_cpu(XFS_BUF_TO_AGF(agbp)->agf_longest), &i);
31 if (error)
32 goto out_del_cursor;
33
34@@ -84,7 +84,7 @@ xfs_trim_extents(
35 if (error)
36 goto out_del_cursor;
37 XFS_WANT_CORRUPTED_GOTO(i == 1, out_del_cursor);
38- ASSERT(flen <= XFS_BUF_TO_AGF(agbp)->agf_longest);
39+ ASSERT(flen <= be32_to_cpu(XFS_BUF_TO_AGF(agbp)->agf_longest));
40
41 /*
42 * Too small? Give up.
43--
441.7.9.5
45