diff options
| -rw-r--r-- | fs/ceph/super.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/ceph/super.c b/fs/ceph/super.c index cad046aa4fd0..a8e8e2629fb4 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c | |||
| @@ -45,7 +45,7 @@ static void ceph_put_super(struct super_block *s) | |||
| 45 | static int ceph_statfs(struct dentry *dentry, struct kstatfs *buf) | 45 | static int ceph_statfs(struct dentry *dentry, struct kstatfs *buf) |
| 46 | { | 46 | { |
| 47 | struct ceph_fs_client *fsc = ceph_inode_to_client(d_inode(dentry)); | 47 | struct ceph_fs_client *fsc = ceph_inode_to_client(d_inode(dentry)); |
| 48 | struct ceph_monmap *monmap = fsc->client->monc.monmap; | 48 | struct ceph_mon_client *monc = &fsc->client->monc; |
| 49 | struct ceph_statfs st; | 49 | struct ceph_statfs st; |
| 50 | u64 fsid; | 50 | u64 fsid; |
| 51 | int err; | 51 | int err; |
| @@ -58,7 +58,7 @@ static int ceph_statfs(struct dentry *dentry, struct kstatfs *buf) | |||
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | dout("statfs\n"); | 60 | dout("statfs\n"); |
| 61 | err = ceph_monc_do_statfs(&fsc->client->monc, data_pool, &st); | 61 | err = ceph_monc_do_statfs(monc, data_pool, &st); |
| 62 | if (err < 0) | 62 | if (err < 0) |
| 63 | return err; | 63 | return err; |
| 64 | 64 | ||
| @@ -94,8 +94,11 @@ static int ceph_statfs(struct dentry *dentry, struct kstatfs *buf) | |||
| 94 | buf->f_namelen = NAME_MAX; | 94 | buf->f_namelen = NAME_MAX; |
| 95 | 95 | ||
| 96 | /* Must convert the fsid, for consistent values across arches */ | 96 | /* Must convert the fsid, for consistent values across arches */ |
| 97 | fsid = le64_to_cpu(*(__le64 *)(&monmap->fsid)) ^ | 97 | mutex_lock(&monc->mutex); |
| 98 | le64_to_cpu(*((__le64 *)&monmap->fsid + 1)); | 98 | fsid = le64_to_cpu(*(__le64 *)(&monc->monmap->fsid)) ^ |
| 99 | le64_to_cpu(*((__le64 *)&monc->monmap->fsid + 1)); | ||
| 100 | mutex_unlock(&monc->mutex); | ||
| 101 | |||
| 99 | buf->f_fsid.val[0] = fsid & 0xffffffff; | 102 | buf->f_fsid.val[0] = fsid & 0xffffffff; |
| 100 | buf->f_fsid.val[1] = fsid >> 32; | 103 | buf->f_fsid.val[1] = fsid >> 32; |
| 101 | 104 | ||
