From: Andras Elso Date: Tue, 26 Feb 2013 23:23:11 +0000 (+0100) Subject: client: use get_filehandle X-Git-Tag: v0.59~94^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7bd84006785ebd2055024c5c0f776e43843ce6ff;p=ceph.git client: use get_filehandle Signed-off-by: Andras Elso --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 6b8cbe76aa93..71bb5d92143f 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -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;