]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: use get_filehandle
authorAndras Elso <elso.andras@gmail.com>
Tue, 26 Feb 2013 23:23:11 +0000 (00:23 +0100)
committerAndras Elso <elso.andras@gmail.com>
Wed, 27 Feb 2013 00:52:59 +0000 (01:52 +0100)
Signed-off-by: Andras Elso <elso.andras@gmail.com>
src/client/Client.cc

index 6b8cbe76aa93ab0229c030b62144d63f57ee9352..71bb5d92143fafbd4fc214f480ba16bced676fd4 100644 (file)
@@ -4460,8 +4460,9 @@ int Client::fchown(int fd, uid_t uid, gid_t gid)
   tout(cct) << fd << std::endl;
   tout(cct) << uid << std::endl;
   tout(cct) << gid << std::endl;
-  assert(fd_map.count(fd));
-  Fh *f = fd_map[fd];
+  Fh *f = get_filehandle(fd);
+  if (!f)
+    return -EBADF;
   struct stat attr;
   attr.st_uid = uid;
   attr.st_gid = gid;