Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[linux-2.6-block.git] / fs / ceph / dir.c
index 2e0afdc1da9e341da7fefa8e269dff099841c8f0..3ab1192d2029301da26ce411987287aa3b309f1d 100644 (file)
@@ -130,7 +130,7 @@ static int __dcache_readdir(struct file *file,  struct dir_context *ctx,
        struct inode *dir = d_inode(parent);
        struct dentry *dentry, *last = NULL;
        struct ceph_dentry_info *di;
-       unsigned nsize = PAGE_CACHE_SIZE / sizeof(struct dentry *);
+       unsigned nsize = PAGE_SIZE / sizeof(struct dentry *);
        int err = 0;
        loff_t ptr_pos = 0;
        struct ceph_readdir_cache_control cache_ctl = {};
@@ -155,7 +155,7 @@ static int __dcache_readdir(struct file *file,  struct dir_context *ctx,
                }
 
                err = -EAGAIN;
-               pgoff = ptr_pos >> PAGE_CACHE_SHIFT;
+               pgoff = ptr_pos >> PAGE_SHIFT;
                if (!cache_ctl.page || pgoff != page_index(cache_ctl.page)) {
                        ceph_readdir_cache_release(&cache_ctl);
                        cache_ctl.page = find_lock_page(&dir->i_data, pgoff);