From: Jianpeng Ma Date: Thu, 13 Aug 2015 09:03:52 +0000 (+0800) Subject: common/ceph_fs: set mode default is -1 for func ceph_flags_to_mode. X-Git-Tag: v9.1.0~381^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=43529a588316643c8e01fc78b241cd1b5aa47fe1;p=ceph.git common/ceph_fs: set mode default is -1 for func ceph_flags_to_mode. Signed-off-by: Jianpeng Ma --- diff --git a/src/common/ceph_fs.cc b/src/common/ceph_fs.cc index 3172c5771624..6b69e267b70f 100644 --- a/src/common/ceph_fs.cc +++ b/src/common/ceph_fs.cc @@ -37,7 +37,8 @@ int ceph_file_layout_is_valid(const struct ceph_file_layout *layout) int ceph_flags_to_mode(int flags) { - int mode = 0; + /* because CEPH_FILE_MODE_PIN is zero, so mode = -1 is error */ + int mode = -1; #ifdef O_DIRECTORY /* fixme */ if ((flags & O_DIRECTORY) == O_DIRECTORY)