From patchwork Sun Jul 3 04:40:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salah Triki X-Patchwork-Id: 9211163 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B242B6086A for ; Sun, 3 Jul 2016 04:40:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A5C25285BF for ; Sun, 3 Jul 2016 04:40:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 90AA0285B5; Sun, 3 Jul 2016 04:40:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C9AC285B5 for ; Sun, 3 Jul 2016 04:40:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750781AbcGCEkf (ORCPT ); Sun, 3 Jul 2016 00:40:35 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:33634 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750713AbcGCEke (ORCPT ); Sun, 3 Jul 2016 00:40:34 -0400 Received: by mail-wm0-f67.google.com with SMTP id r201so14273994wme.0; Sat, 02 Jul 2016 21:40:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=BRBxhJP8Yk5C74yc9+4gGVfbmIDsA6Vo6xn9kT0urww=; b=Hhkua799sLRRm8Wjxk78mFyAoAFvfnDdVfUFMa6XKNNaaDe/NbchOw6nKuhjiWLP5J 4hXA/QcDJIilUVXjra9EPsfy4qdL9T4MYwZV2oLUZ01rxQSRIbj58KIEAHpdI/xYq/9F CSb8Y8IVssnk9urMF6NWZhfBNEvU3CXJFTJxeaN4ahMQDyNcTB7CN8m5JOuKXKXb/pI6 QiXWc1tLU9+RR6PBtFa/oMsy02B+0Xo3S/TZ6/Bs6H0KmkEujazX9A3akhxNKwygukiO MJoariGPgMoqV+CGUgyS9fQ14fZ+GY5UDCBoM4EKYwCx4gy8+Tkon4QWVIEc33s5AUhC r0WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=BRBxhJP8Yk5C74yc9+4gGVfbmIDsA6Vo6xn9kT0urww=; b=Wu6URVHmvVJOcNY/b45r/KQIoPXVIdG+L1gmuJCdsMrAEo9oHFIXgWKt5W8zMWC0Cc xbbhpB+vjzkh8jZdm/LJaXAxZUrGnc0JUEWk2Zecw/huYbwMcXV3pZvnRSov+1fhb5qy VkF4ej6sLwpMk0G39/olPDMtd84oMkYYyJ8H9WVfUwcOjnAIEyNqmEzq57Z6Skuta5jU 86/IumnPeuef+xVLYkwsNVMYQkYeIvqjMRnTnV2VoDIO1REAwXd380T8n8tP3YPlLQwz PyN2YSkd4T5kG076gs8VJOtPzw3micDsMAHC3vlQuk/NUX8DiV318lb1DhKdtUmXu1jA rYqw== X-Gm-Message-State: ALyK8tIr/WqKiUT88D9jAXc+J7YIiT48FTsEViRT+MGfRB5NI9a3iraljybHSaAuEEnO3Q== X-Received: by 10.28.48.3 with SMTP id w3mr5011711wmw.28.1467520832370; Sat, 02 Jul 2016 21:40:32 -0700 (PDT) Received: from localhost.localdomain ([197.27.58.140]) by smtp.gmail.com with ESMTPSA id b2sm143356wjy.1.2016.07.02.21.40.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 02 Jul 2016 21:40:31 -0700 (PDT) From: Salah Triki To: clm@fb.com, jbacik@fb.com, dsterba@suse.com Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, salah.triki@gmail.com Subject: [PATCH] fs: btrfs: Replace -ENOENT by -ERANGE in btrfs_get_acl() Date: Sun, 3 Jul 2016 05:40:10 +0100 Message-Id: <1467520810-11027-1-git-send-email-salah.triki@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP size contains the value returned by posix_acl_from_xattr(), which returns -ERANGE, -ENODATA, zero, or an integer greater than zero. So replace -ENOENT by -ERANGE. Signed-off-by: Salah Triki Reviewed-by: David Sterba --- fs/btrfs/acl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c index 67a6077..53bb7af 100644 --- a/fs/btrfs/acl.c +++ b/fs/btrfs/acl.c @@ -55,8 +55,7 @@ struct posix_acl *btrfs_get_acl(struct inode *inode, int type) } if (size > 0) { acl = posix_acl_from_xattr(&init_user_ns, value, size); - } else if (size == -ENOENT || size == -ENODATA || size == 0) { - /* FIXME, who returns -ENOENT? I think nobody */ + } else if (size == -ERANGE || size == -ENODATA || size == 0) { acl = NULL; } else { acl = ERR_PTR(-EIO);