diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-03-20 12:58:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-20 14:14:38 -0400 |
commit | ad2a8e6078a16d3b61b530f1447110841c36ae56 (patch) | |
tree | f926ff62ed28c3bec8527a94b0ac5e46556e8e38 /fs | |
parent | 161f7a7161191ab9c2e97f787829ef8dd2b95771 (diff) |
AFS: checking wrong bit in afs_readpages()
We should be testing "if (vnode->flags & (1 << 4))" instead of
"if (vnode->flags & 4) {". The current test checks if the data was
modified instead of deleted.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/afs/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/afs/file.c b/fs/afs/file.c index 14d89fa58fee..8f6e9234d565 100644 --- a/fs/afs/file.c +++ b/fs/afs/file.c | |||
@@ -251,7 +251,7 @@ static int afs_readpages(struct file *file, struct address_space *mapping, | |||
251 | ASSERT(key != NULL); | 251 | ASSERT(key != NULL); |
252 | 252 | ||
253 | vnode = AFS_FS_I(mapping->host); | 253 | vnode = AFS_FS_I(mapping->host); |
254 | if (vnode->flags & AFS_VNODE_DELETED) { | 254 | if (test_bit(AFS_VNODE_DELETED, &vnode->flags)) { |
255 | _leave(" = -ESTALE"); | 255 | _leave(" = -ESTALE"); |
256 | return -ESTALE; | 256 | return -ESTALE; |
257 | } | 257 | } |