From 7bd84006785ebd2055024c5c0f776e43843ce6ff Mon Sep 17 00:00:00 2001 From: Andras Elso Date: Wed, 27 Feb 2013 00:23:11 +0100 Subject: [PATCH] client: use get_filehandle Signed-off-by: Andras Elso --- src/client/Client.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index 6b8cbe76aa93a..71bb5d92143fa 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; -- 2.39.5