From: Ilya Dryomov Date: Thu, 5 Jun 2014 06:08:41 +0000 (+0400) Subject: XfsFileStoreBackend: nuke redundant goto in set_extsize() X-Git-Tag: v0.83~128^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=750b1db6fe89117c3f6640cc532ff7d3cf650583;p=ceph.git XfsFileStoreBackend: nuke redundant goto in set_extsize() Signed-off-by: Ilya Dryomov --- diff --git a/src/os/XfsFileStoreBackend.cc b/src/os/XfsFileStoreBackend.cc index 7b632d8a622e..cfda1acfab8c 100644 --- a/src/os/XfsFileStoreBackend.cc +++ b/src/os/XfsFileStoreBackend.cc @@ -47,18 +47,17 @@ int XfsFileStoreBackend::set_extsize(int fd, unsigned int val) if (fstat(fd, &sb) < 0) { ret = -errno; dout(0) << "set_extsize: fstat: " << cpp_strerror(ret) << dendl; - goto out; + return ret; } if (!S_ISREG(sb.st_mode)) { - ret = -EINVAL; dout(0) << "set_extsize: invalid target file type" << dendl; - goto out; + return -EINVAL; } if (ioctl(fd, XFS_IOC_FSGETXATTR, &fsx) < 0) { ret = -errno; dout(0) << "set_extsize: FSGETXATTR: " << cpp_strerror(ret) << dendl; - goto out; + return ret; } fsx.fsx_xflags |= XFS_XFLAG_EXTSIZE; @@ -67,12 +66,10 @@ int XfsFileStoreBackend::set_extsize(int fd, unsigned int val) if (ioctl(fd, XFS_IOC_FSSETXATTR, &fsx) < 0) { ret = -errno; dout(0) << "set_extsize: FSSETXATTR: " << cpp_strerror(ret) << dendl; - goto out; + return ret; } - ret = 0; -out: - return ret; + return 0; } int XfsFileStoreBackend::detect_features()