diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-12-14 20:02:15 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-12-14 20:02:15 +0100 |
commit | e97b71ded9ebe527681961c9e6f5ba99f6711974 (patch) | |
tree | a724e6f951456f1d855b55e3f34e3710b37f9f9a /fs/ceph/dir.c | |
parent | Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6 (diff) | |
parent | ceph: fix ioctl magic (diff) | |
download | linux-e97b71ded9ebe527681961c9e6f5ba99f6711974.tar.xz linux-e97b71ded9ebe527681961c9e6f5ba99f6711974.zip |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
ceph: fix ioctl magic
ceph: Behave better when handling file lock replies.
ceph: pass lock information by struct file_lock instead of as individual params.
ceph: Handle file locks in replies from the MDS.
ceph: avoid possible null deref in readdir after dir llseek
Diffstat (limited to 'fs/ceph/dir.c')
-rw-r--r-- | fs/ceph/dir.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 7d447af84ec4..158c700fdca5 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -114,8 +114,8 @@ static int __dcache_readdir(struct file *filp, spin_lock(&dcache_lock); /* 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)) goto out_unlock; p = parent->d_subdirs.prev; |