diff options
author | Dave Chinner <dchinner@redhat.com> | 2012-04-23 01:59:05 -0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2012-05-14 17:21:01 -0400 |
commit | 12bcb3f7d4371f74bd25372e98e0d2da978e82b2 (patch) | |
tree | 34179626e2d3312bd66a9b14fbb926df1fc45401 /fs/xfs/xfs_buf.c | |
parent | ad1e95c54eb3980ab2b4683fba29ad0ef954ec51 (diff) |
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 <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_buf.c')
-rw-r--r-- | fs/xfs/xfs_buf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index af8480d5c71d..b2795bab1a01 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c | |||
@@ -178,9 +178,10 @@ xfs_buf_alloc( | |||
178 | return NULL; | 178 | return NULL; |
179 | 179 | ||
180 | /* | 180 | /* |
181 | * We don't want certain flags to appear in b_flags. | 181 | * We don't want certain flags to appear in b_flags unless they are |
182 | * specifically set by later operations on the buffer. | ||
182 | */ | 183 | */ |
183 | flags &= ~(XBF_MAPPED|XBF_READ_AHEAD); | 184 | flags &= ~(XBF_MAPPED | XBF_TRYLOCK | XBF_ASYNC | XBF_READ_AHEAD); |
184 | 185 | ||
185 | atomic_set(&bp->b_hold, 1); | 186 | atomic_set(&bp->b_hold, 1); |
186 | atomic_set(&bp->b_lru_ref, 1); | 187 | atomic_set(&bp->b_lru_ref, 1); |