diff options
Diffstat (limited to 'kernel/fs/ceph/mds_client.c')
-rw-r--r-- | kernel/fs/ceph/mds_client.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/fs/ceph/mds_client.c b/kernel/fs/ceph/mds_client.c index e7b130a63..239bc9cba 100644 --- a/kernel/fs/ceph/mds_client.c +++ b/kernel/fs/ceph/mds_client.c @@ -274,12 +274,13 @@ static int parse_reply_info_extra(void **p, void *end, struct ceph_mds_reply_info_parsed *info, u64 features) { - if (info->head->op == CEPH_MDS_OP_GETFILELOCK) + u32 op = le32_to_cpu(info->head->op); + + if (op == CEPH_MDS_OP_GETFILELOCK) return parse_reply_info_filelock(p, end, info, features); - else if (info->head->op == CEPH_MDS_OP_READDIR || - info->head->op == CEPH_MDS_OP_LSSNAP) + else if (op == CEPH_MDS_OP_READDIR || op == CEPH_MDS_OP_LSSNAP) return parse_reply_info_dir(p, end, info, features); - else if (info->head->op == CEPH_MDS_OP_CREATE) + else if (op == CEPH_MDS_OP_CREATE) return parse_reply_info_create(p, end, info, features); else return -EIO; |