summaryrefslogtreecommitdiffstats
path: root/fs/qnx6/dir.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-05-17 15:21:56 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-05-31 15:17:31 -0400
commit1d7095c72d35eee4ebc28e66563e636b9adafeb2 (patch)
tree9af1a639bd7a26c7c4d77506eef615153fef2a79 /fs/qnx6/dir.c
parent801d9d26bfd6e88e9cf0efbb30b649d1bdc15dcf (diff)
qnx6: qnx6_readdir() has a braino in pos calculation
We want to mask lower 5 bits out, not leave only those and clear the rest... As it is, we end up always starting to read from the beginning of directory, no matter what the current position had been. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/qnx6/dir.c')
-rw-r--r--fs/qnx6/dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/qnx6/dir.c b/fs/qnx6/dir.c
index 8798d065e40..afa6be6fc39 100644
--- a/fs/qnx6/dir.c
+++ b/fs/qnx6/dir.c
@@ -120,7 +120,7 @@ static int qnx6_readdir(struct file *filp, void *dirent, filldir_t filldir)
struct inode *inode = file_inode(filp);
struct super_block *s = inode->i_sb;
struct qnx6_sb_info *sbi = QNX6_SB(s);
- loff_t pos = filp->f_pos & (QNX6_DIR_ENTRY_SIZE - 1);
+ loff_t pos = filp->f_pos & ~(QNX6_DIR_ENTRY_SIZE - 1);
unsigned long npages = dir_pages(inode);
unsigned long n = pos >> PAGE_CACHE_SHIFT;
unsigned start = (pos & ~PAGE_CACHE_MASK) / QNX6_DIR_ENTRY_SIZE;