Loading fs/ceph/dir.c +6 −3 Original line number Diff line number Diff line Loading @@ -454,7 +454,7 @@ static int ceph_readdir(struct file *file, struct dir_context *ctx) return 0; } static void reset_readdir(struct ceph_file_info *fi) static void reset_readdir(struct ceph_file_info *fi, unsigned frag) { if (fi->last_readdir) { ceph_mdsc_put_request(fi->last_readdir); Loading @@ -462,7 +462,10 @@ static void reset_readdir(struct ceph_file_info *fi) } kfree(fi->last_name); fi->last_name = NULL; if (ceph_frag_is_leftmost(frag)) fi->next_offset = 2; /* compensate for . and .. */ else fi->next_offset = 0; if (fi->dentry) { dput(fi->dentry); fi->dentry = NULL; Loading Loading @@ -507,7 +510,7 @@ static loff_t ceph_dir_llseek(struct file *file, loff_t offset, int whence) fpos_frag(offset) != fi->frag || fpos_off(offset) < fi->offset) { dout("dir_llseek dropping %p content\n", file); reset_readdir(fi); reset_readdir(fi, fpos_frag(offset)); } /* bump dir_release_count if we did a forward seek */ Loading Loading
fs/ceph/dir.c +6 −3 Original line number Diff line number Diff line Loading @@ -454,7 +454,7 @@ static int ceph_readdir(struct file *file, struct dir_context *ctx) return 0; } static void reset_readdir(struct ceph_file_info *fi) static void reset_readdir(struct ceph_file_info *fi, unsigned frag) { if (fi->last_readdir) { ceph_mdsc_put_request(fi->last_readdir); Loading @@ -462,7 +462,10 @@ static void reset_readdir(struct ceph_file_info *fi) } kfree(fi->last_name); fi->last_name = NULL; if (ceph_frag_is_leftmost(frag)) fi->next_offset = 2; /* compensate for . and .. */ else fi->next_offset = 0; if (fi->dentry) { dput(fi->dentry); fi->dentry = NULL; Loading Loading @@ -507,7 +510,7 @@ static loff_t ceph_dir_llseek(struct file *file, loff_t offset, int whence) fpos_frag(offset) != fi->frag || fpos_off(offset) < fi->offset) { dout("dir_llseek dropping %p content\n", file); reset_readdir(fi); reset_readdir(fi, fpos_frag(offset)); } /* bump dir_release_count if we did a forward seek */ Loading