From patchwork Fri Feb 14 05:29:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guangliang Zhao X-Patchwork-Id: 3650011 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6D7519F334 for ; Fri, 14 Feb 2014 05:30:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AC1B920218 for ; Fri, 14 Feb 2014 05:30:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D359120213 for ; Fri, 14 Feb 2014 05:30:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751962AbaBNFaI (ORCPT ); Fri, 14 Feb 2014 00:30:08 -0500 Received: from mail-pd0-f172.google.com ([209.85.192.172]:56078 "EHLO mail-pd0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751740AbaBNFaH (ORCPT ); Fri, 14 Feb 2014 00:30:07 -0500 Received: by mail-pd0-f172.google.com with SMTP id p10so11478952pdj.17 for ; Thu, 13 Feb 2014 21:30:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=lrabAXDq89jgPQ/1EK9Z9wDDGeQfKTzhEHDUgFJRFDI=; b=YDU8U9vN0D1gO1DfjohPp96gVBNfO3VFsNhf5kHkpgi3TKlMdeHB/BkSwBMMAsoRBr o8vjEaRLTb3Y3G71Jw8OA1xv0FP+6Qa2V+zxWc2xkjw2bO9oF3WnKTmUwsx66SXJ1yuh IXL5JiwJgoyFuJnMaLxrZXkV9sOxs006aKk5IQ/R0GIFOVVTY+aGeM3JJKgpVNHsYfJr mYTVSZVUCeV5HSy7VppcZ6IgIddH8abcF5DgMAMOCpYMGCkfNe4st+gdsze5WU84cCwq eqcF/r5s/jAIoojGKGgysteyjizZTL8yquUmdzrKsDua1gJTMI5qX7ipF047zDnmfXkx WVSg== X-Received: by 10.66.26.10 with SMTP id h10mr6703315pag.24.1392355806975; Thu, 13 Feb 2014 21:30:06 -0800 (PST) Received: from localhost ([118.194.208.131]) by mx.google.com with ESMTPSA id fk4sm31673656pab.23.2014.02.13.21.30.04 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 13 Feb 2014 21:30:06 -0800 (PST) From: Guangliang Zhao To: ceph-devel@vger.kernel.org Cc: sage@inktank.com Subject: [PATCH 3/3] ceph: make ceph ACL for symlink inheritable Date: Fri, 14 Feb 2014 13:29:44 +0800 Message-Id: <1392355784-10422-4-git-send-email-lucienchao@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1392355784-10422-1-git-send-email-lucienchao@gmail.com> References: <1392355784-10422-1-git-send-email-lucienchao@gmail.com> Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Default ACL couldn't be inherited by the symlink in the parent directory. This resolve it. Signed-off-by: Guangliang Zhao Reviewed-by: Alex Elder --- fs/ceph/dir.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 619616d..2650570 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -735,6 +735,10 @@ static int ceph_symlink(struct inode *dir, struct dentry *dentry, if (!err && !req->r_reply_info.head->is_dentry) err = ceph_handle_notrace_create(dir, dentry); ceph_mdsc_put_request(req); + + if (!err) + err = ceph_init_acl(dentry, dentry->d_inode, dir); + if (err) d_drop(dentry); return err;