Commit 0ed26f36 authored by Ilya Dryomov's avatar Ilya Dryomov

ceph: fix indentation in __get_snap_name()

Reported-by: default avatarkbuild test robot <lkp@intel.com>
Reported-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent 98cd281a
...@@ -458,33 +458,33 @@ static int __get_snap_name(struct dentry *parent, char *name, ...@@ -458,33 +458,33 @@ static int __get_snap_name(struct dentry *parent, char *name,
if (err < 0) if (err < 0)
goto out; goto out;
rinfo = &req->r_reply_info; rinfo = &req->r_reply_info;
for (i = 0; i < rinfo->dir_nr; i++) { for (i = 0; i < rinfo->dir_nr; i++) {
rde = rinfo->dir_entries + i; rde = rinfo->dir_entries + i;
BUG_ON(!rde->inode.in); BUG_ON(!rde->inode.in);
if (ceph_snap(inode) == if (ceph_snap(inode) ==
le64_to_cpu(rde->inode.in->snapid)) { le64_to_cpu(rde->inode.in->snapid)) {
memcpy(name, rde->name, rde->name_len); memcpy(name, rde->name, rde->name_len);
name[rde->name_len] = '\0'; name[rde->name_len] = '\0';
err = 0; err = 0;
goto out; goto out;
} }
} }
if (rinfo->dir_end) if (rinfo->dir_end)
break; break;
BUG_ON(rinfo->dir_nr <= 0); BUG_ON(rinfo->dir_nr <= 0);
rde = rinfo->dir_entries + (rinfo->dir_nr - 1); rde = rinfo->dir_entries + (rinfo->dir_nr - 1);
next_offset += rinfo->dir_nr; next_offset += rinfo->dir_nr;
last_name = kstrndup(rde->name, rde->name_len, GFP_KERNEL); last_name = kstrndup(rde->name, rde->name_len, GFP_KERNEL);
if (!last_name) { if (!last_name) {
err = -ENOMEM; err = -ENOMEM;
goto out; goto out;
} }
ceph_mdsc_put_request(req); ceph_mdsc_put_request(req);
req = NULL; req = NULL;
} }
err = -ENOENT; err = -ENOENT;
out: out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment