From: Varsha Rao Date: Wed, 9 Oct 2019 06:00:06 +0000 (+0530) Subject: cephfs-shell: Remove extra length argument passed to setxattr() X-Git-Tag: v15.1.0~295^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d6f370e67da80658c7e74a6f2c9666d48dca3f9e;p=ceph.git cephfs-shell: Remove extra length argument passed to setxattr() Length is computed before calling ceph_setxattr() in setxattr() definition. Fixes: https://tracker.ceph.com/issues/42238 Signed-off-by: Varsha Rao --- diff --git a/src/tools/cephfs/cephfs-shell b/src/tools/cephfs/cephfs-shell index 5bcc7a8f7b3..177dd653562 100755 --- a/src/tools/cephfs/cephfs-shell +++ b/src/tools/cephfs/cephfs-shell @@ -1258,13 +1258,11 @@ class CephFSShell(Cmd): max_bytes = to_bytes(str(args.max_bytes)) try: cephfs.setxattr(args.path, 'ceph.quota.max_bytes', - max_bytes, len(max_bytes), - os.XATTR_CREATE) + max_bytes, os.XATTR_CREATE) poutput('max_bytes set to %d' % args.max_bytes) except libcephfs.Error: cephfs.setxattr(args.path, 'ceph.quota.max_bytes', - max_bytes, len(max_bytes), - os.XATTR_REPLACE) + max_bytes, os.XATTR_REPLACE) perror('max_bytes reset to %d' % args.max_bytes) self.exit_code = 1 @@ -1272,13 +1270,11 @@ class CephFSShell(Cmd): max_files = to_bytes(str(args.max_files)) try: cephfs.setxattr(args.path, 'ceph.quota.max_files', - max_files, len(max_files), - os.XATTR_CREATE) + max_files, os.XATTR_CREATE) poutput('max_files set to %d' % args.max_files) except libcephfs.Error: cephfs.setxattr(args.path, 'ceph.quota.max_files', - max_files, len(max_files), - os.XATTR_REPLACE) + max_files, os.XATTR_REPLACE) perror('max_files reset to %d' % args.max_files) self.exit_code = 1 elif args.op == 'get':