]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: fix ceph_dir_llseek()
authorYan, Zheng <zheng.z.yan@intel.com>
Thu, 27 Feb 2014 08:26:24 +0000 (16:26 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Thu, 3 Apr 2014 02:33:52 +0000 (10:33 +0800)
commitdf6672e912b1dff5070fae441e198d657da25be6
treee12b390f7d458c085fb91b9ebe220e4147dbe41c
parent82f09752d0ca96c890a85b7dbb6b3989db6f2f0e
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>
fs/ceph/dir.c
fs/ceph/super.h