From patchwork Mon Dec 21 11:52:58 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: liu weni X-Patchwork-Id: 69108 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id nBLBnx3G018859 for ; Mon, 21 Dec 2009 11:49:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756631AbZLULt1 (ORCPT ); Mon, 21 Dec 2009 06:49:27 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756626AbZLULt1 (ORCPT ); Mon, 21 Dec 2009 06:49:27 -0500 Received: from mail-pw0-f42.google.com ([209.85.160.42]:40518 "EHLO mail-pw0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756625AbZLULt0 (ORCPT ); Mon, 21 Dec 2009 06:49:26 -0500 Received: by pwj9 with SMTP id 9so3121473pwj.21 for ; Mon, 21 Dec 2009 03:49:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=JSIeaRAeRS2iFcXpt32j0kiCN6u2iwYTnD8w1nn2SUU=; b=Gk8cRYF+RD+m3DSRJMlti0BvBceqW++KJg7Ef+VckxTFXXoP/QymR8IJfu/WsBkCDE /uXCJ4s9vbFQWdjXgz/tSJfjrf/ldHLZTuR/ZlcDy+Bddz+36ayXIxhbojs0SYI4Nbgl RHjbNV45252d3Tl+6Yv52dFnIylxFOAn4WJ+I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=Q41v7D+grF6OMPTlLF5t3c7ZY0ynrcRWUK2X16Qan3DPvmwVZRsgWzikF+9m7dkzN2 yKgmmvsW+Oa/V4sBHCbypG5ZGXsGbdxoxJFiBjrbg2Lg+Y7xSVn4Kc6TtC15a+lQfYxM AY2NNPLj7HjlPynkHmNDvDoKg0UPkuO2sTVvQ= Received: by 10.114.187.17 with SMTP id k17mr4738823waf.227.1261396165417; Mon, 21 Dec 2009 03:49:25 -0800 (PST) Received: from ?10.27.112.72? ([221.6.44.7]) by mx.google.com with ESMTPS id 23sm5195275pzk.0.2009.12.21.03.49.21 (version=SSLv3 cipher=RC4-MD5); Mon, 21 Dec 2009 03:49:24 -0800 (PST) Message-ID: <4B2F619A.8000407@gmail.com> Date: Mon, 21 Dec 2009 19:52:58 +0800 From: Liuwenyi Reply-To: qingshenlwy@gmail.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 MIME-Version: 1.0 To: chris.mason@oracle.com, viro@zeniv.linux.org.uk, joel.becker@oracle.com, cjb@laptop.org, jmorris@namei.org, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, onlyflyer@gmail.com, strongzgy@gmail.com Subject: [PATCHv2 02/12]posix_acl: Add the check items Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c index 2e9e699..0f14f95 100644 --- a/fs/btrfs/acl.c +++ b/fs/btrfs/acl.c @@ -102,12 +102,9 @@ static int btrfs_set_acl(struct btrfs_trans_handle *trans, char *value = NULL; mode_t mode; - if (acl) { - ret = posix_acl_valid(acl); - if (ret < 0) - return ret; - ret = 0; - } + ret = posix_acl_valid(acl); + if (ret < 0) + return ret; switch (type) {