]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crush: fix mishandle result of get_bucket() method
authorxie xingguo <xie.xingguo@zte.com.cn>
Thu, 21 Apr 2016 03:50:05 +0000 (11:50 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Thu, 21 Apr 2016 07:49:07 +0000 (15:49 +0800)
commitb0b5392d1a403cb482e9632e0f773924e337dcf6
treee2be08879d8c722f818fee967317b48d1fadb070
parenteff74daf9c53bcd86ff4f6f9c8958f9b04085fdf
crush: fix mishandle result of get_bucket() method

Get_bucket() is supposed to return a pointer to a specific bucket on success.
However, it never returns a null pointer if error occurs. It returns
-ENOENT instead. That's why most caller is misjudge the result code of get_bucket()
method.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/crush/CrushWrapper.cc