diff options
author | Yan, Zheng <zheng.z.yan@intel.com> | 2014-02-27 16:26:24 +0800 |
---|---|---|
committer | Yan, Zheng <zheng.z.yan@intel.com> | 2014-04-03 10:33:52 +0800 |
commit | f0494206076703aaa0c8005eff41c413216ae26b (patch) | |
tree | e12b390f7d458c085fb91b9ebe220e4147dbe41c /fs/ceph/super.h | |
parent | 0ccd59266973047770d5160318561c9189b79c93 (diff) | |
download | talos-op-linux-f0494206076703aaa0c8005eff41c413216ae26b.tar.gz talos-op-linux-f0494206076703aaa0c8005eff41c413216ae26b.zip |
ceph: fix ceph_dir_llseek()
Comparing offset with inode->i_sb->s_maxbytes doesn't make sense for
directory. For a fragmented directory, offset (frag_t, off) can be
larger than inode->i_sb->s_maxbytes.
At the very beginning of ceph_dir_llseek(), local variable old_offset
is initialized to parameter offset. This doesn't make sense neither.
Old_offset should be ceph_make_fpos(fi->frag, fi->next_offset).
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r-- | fs/ceph/super.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h index d8801a95b685..70bb183385b7 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h @@ -577,7 +577,7 @@ struct ceph_file_info { /* readdir: position within a frag */ unsigned offset; /* offset of last chunk, adjusted for . and .. */ - u64 next_offset; /* offset of next chunk (last_name's + 1) */ + unsigned next_offset; /* offset of next chunk (last_name's + 1) */ char *last_name; /* last entry in previous chunk */ struct dentry *dentry; /* next dentry (for dcache readdir) */ int dir_release_count; |