Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[cascardo/linux.git] / fs / ceph / ioctl.c
index 843dd31..7d752d5 100644 (file)
@@ -213,9 +213,12 @@ static long ceph_ioctl_get_dataloc(struct file *file, void __user *arg)
                 ceph_ino(inode), dl.object_no);
 
        oloc.pool = ci->i_layout.pool_id;
+       oloc.pool_ns = ceph_try_get_string(ci->i_layout.pool_ns);
        ceph_oid_printf(&oid, "%s", dl.object_name);
 
        r = ceph_object_locator_to_pg(osdc->osdmap, &oid, &oloc, &pgid);
+
+       ceph_oloc_destroy(&oloc);
        if (r < 0) {
                up_read(&osdc->lock);
                return r;
@@ -247,9 +250,8 @@ static long ceph_ioctl_lazyio(struct file *file)
 
        if ((fi->fmode & CEPH_FILE_MODE_LAZY) == 0) {
                spin_lock(&ci->i_ceph_lock);
-               ci->i_nr_by_mode[fi->fmode]--;
                fi->fmode |= CEPH_FILE_MODE_LAZY;
-               ci->i_nr_by_mode[fi->fmode]++;
+               ci->i_nr_by_mode[ffs(CEPH_FILE_MODE_LAZY)]++;
                spin_unlock(&ci->i_ceph_lock);
                dout("ioctl_layzio: file %p marked lazy\n", file);