|author||Dave Chinner <email@example.com>||2012-04-23 15:59:05 +1000|
|committer||Ben Myers <firstname.lastname@example.org>||2012-05-14 16:21:01 -0500|
xfs: Properly exclude IO type flags from buffer flags
Recent event tracing during a debugging session showed that flags that define the IO type for a buffer are leaking into the flags on the buffer incorrectly. Fix the flag exclusion mask in xfs_buf_alloc() to avoid problems that may be caused by such leakage. Signed-off-by: Dave Chinner <email@example.com> Reviewed-by: Mark Tinguely <firstname.lastname@example.org> Reviewed-by: Christoph Hellwig <email@example.com> Signed-off-by: Ben Myers <firstname.lastname@example.org>
Diffstat (limited to 'fs/xfs/xfs_buf.c')
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index af8480d5c71..b2795bab1a0 100644
@@ -178,9 +178,10 @@ xfs_buf_alloc(
- * We don't want certain flags to appear in b_flags.
+ * We don't want certain flags to appear in b_flags unless they are
+ * specifically set by later operations on the buffer.
- flags &= ~(XBF_MAPPED|XBF_READ_AHEAD);
+ flags &= ~(XBF_MAPPED | XBF_TRYLOCK | XBF_ASYNC | XBF_READ_AHEAD);