|
@@ -114,8 +114,8 @@ static int __dcache_readdir(struct file *filp,
|
|
spin_lock(&dcache_lock);
|
|
spin_lock(&dcache_lock);
|
|
|
|
|
|
/* start at beginning? */
|
|
/* start at beginning? */
|
|
- if (filp->f_pos == 2 || (last &&
|
|
|
|
- filp->f_pos < ceph_dentry(last)->offset)) {
|
|
|
|
|
|
+ if (filp->f_pos == 2 || last == NULL ||
|
|
|
|
+ filp->f_pos < ceph_dentry(last)->offset) {
|
|
if (list_empty(&parent->d_subdirs))
|
|
if (list_empty(&parent->d_subdirs))
|
|
goto out_unlock;
|
|
goto out_unlock;
|
|
p = parent->d_subdirs.prev;
|
|
p = parent->d_subdirs.prev;
|