From patchwork Fri Jul 17 02:37:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gang He X-Patchwork-Id: 11668845 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C486F913 for ; Fri, 17 Jul 2020 02:39:23 +0000 (UTC) Received: from aserp2120.oracle.com (aserp2120.oracle.com [141.146.126.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9025C2076D for ; Fri, 17 Jul 2020 02:39:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9025C2076D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=ocfs2-devel-bounces@oss.oracle.com Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06H2bUB7073992; Fri, 17 Jul 2020 02:38:38 GMT Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 3275cmmsc5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 17 Jul 2020 02:38:38 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06H2bqrc031797; Fri, 17 Jul 2020 02:38:38 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3020.oracle.com with ESMTP id 32akr4kptv-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Fri, 17 Jul 2020 02:38:38 +0000 Received: from localhost ([127.0.0.1] helo=lb-oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1jwGGj-0002xk-3Z; Thu, 16 Jul 2020 19:38:37 -0700 Received: from aserp3020.oracle.com ([141.146.126.70]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1jwGGV-0002wr-Pq for ocfs2-devel@oss.oracle.com; Thu, 16 Jul 2020 19:38:23 -0700 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06H2bi9f169123 for ; Fri, 17 Jul 2020 02:38:23 GMT Received: from userp2040.oracle.com (userp2040.oracle.com [156.151.31.90]) by aserp3020.oracle.com with ESMTP id 327qbda73n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 17 Jul 2020 02:38:23 +0000 Received: from pps.filterd (userp2040.oracle.com [127.0.0.1]) by userp2040.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06H2VGYO046879 for ; Fri, 17 Jul 2020 02:38:22 GMT Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [62.140.7.102]) by userp2040.oracle.com with ESMTP id 32asp3d44m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=OK) for ; Fri, 17 Jul 2020 02:38:21 +0000 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01lp2053.outbound.protection.outlook.com [104.47.0.53]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-20-Xea-ARSePESLYEeLgbWDgA-1; Fri, 17 Jul 2020 04:38:17 +0200 X-MC-Unique: Xea-ARSePESLYEeLgbWDgA-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dyLXA6rlv1gCzRPi3gAoqGJ07w8NqQ57wwW5s8bIOx0rSut9o+xqB1vvUezKaklmtzt30IZ2RNvjZwqwTjEqMAJOnGnSJun61/0aNrPRWkqokYqyRznhiSi6/9FDdliY6OHXrCfyO2E2Rvf8IZ7xCvgpwKLJ27ZopERmhNYmYbQw3h0lE9KtOoBWwk0yQRURn6OCsGD1W6PywiOiEbsptvzFSowoNGG+iCETOxoOXs5NoLBowUv+glKTfcBnWueZrvGNCQB+cBxsv7ta2ae31mfOBiSXcR/lndTjWLjjK5l1p1zEgcxHs/xkiYPn29C5kriVGHpCitLNNgrQVLRb5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZOXT610xczuOMpe++wIVTdx9sxYYLDgMkXvZBCXftKU=; b=doDIczDBbMUS5qqj/NtB8Dk5hCT3oOe2F2JIzIRh72SfHeUEkidF4Mh1tXGlxYfaPqkE0vMypCs93A/ZhK3AKzayrZ7Vxm0haBYibWieYHAfTMERomx7Itugd6Rs8OHQYNhDG2sYTDIzmQ1h4wm2l4Dus3ti091uCQxfKIim/EvA6lk/gASgsk0WZxE2DWQ6dXx/M7KBeFopcb7NhpC4GEHqjtVHiWaMP0GKlsruYO86rIgQz6QTxg3dzmlWGEfhM/5Gl9G4RbHnw7HLgMyPjSzz4U15i0AG2YbllPHYt6tZ6uoTpGz/NaEcNRpshhbT+D0+/UV01Bwd4RnLubyONw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: fasheh.com; dkim=none (message not signed) header.d=none; fasheh.com; dmarc=none action=none header.from=suse.com; Received: from HE1PR0402MB3514.eurprd04.prod.outlook.com (2603:10a6:7:83::19) by HE1PR0401MB2297.eurprd04.prod.outlook.com (2603:10a6:3:23::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.23; Fri, 17 Jul 2020 02:38:16 +0000 Received: from HE1PR0402MB3514.eurprd04.prod.outlook.com ([fe80::80b2:e0fa:5159:1470]) by HE1PR0402MB3514.eurprd04.prod.outlook.com ([fe80::80b2:e0fa:5159:1470%7]) with mapi id 15.20.3195.022; Fri, 17 Jul 2020 02:38:16 +0000 From: Gang He To: mark@fasheh.com, jlbec@evilplan.org, joseph.qi@linux.alibaba.com Date: Fri, 17 Jul 2020 10:37:51 +0800 Message-Id: <20200717023751.9922-1-ghe@suse.com> X-Mailer: git-send-email 2.12.3 X-ClientProxiedBy: HK2PR06CA0009.apcprd06.prod.outlook.com (2603:1096:202:2e::21) To HE1PR0402MB3514.eurprd04.prod.outlook.com (2603:10a6:7:83::19) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from ghe-pc.suse.asia (60.251.47.115) by HK2PR06CA0009.apcprd06.prod.outlook.com (2603:1096:202:2e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3195.18 via Frontend Transport; Fri, 17 Jul 2020 02:38:12 +0000 X-Mailer: git-send-email 2.12.3 X-Originating-IP: [60.251.47.115] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d30ae6d7-c0e8-4e32-b997-08d829fa74ef X-MS-TrafficTypeDiagnostic: HE1PR0401MB2297: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1247; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wgZ4czrAnKlZTS4dTI4YRmlucmgAJsNSii/AztrnKNm4QJq0hWrnVoK1l0eqtLjPq2ckPM1wZ+5bn8hafJJunr6ZjRTXX4tuVrdKJk1cglp4QVQ5YDMaT17fxtLoyFGCj31RNvC9oZlGzAj7z9VNweYTXxoCDuPkH5tMsC1aJFCZqR/9B+hmjv87otUft7vwiDc8aS1vFW4KM94Z88rDkrVLAxfY6FN/ac++jUJieKoXA6a71a5+XhsJpwEx/luYWZAYtGqYs/vIMzCHt+bdTYHh0K3UJudgg+I3N6BZOHq5pV389Ld8mH0C+qtIk6mb+nEwt1xO84UbKUTQLtq5c8E0NGABzWNWXco1y26A2vC2o2uvIT7+u+2HKULTnaw2 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:HE1PR0402MB3514.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(366004)(136003)(39860400002)(376002)(346002)(396003)(6486002)(1076003)(4326008)(26005)(66946007)(86362001)(66556008)(66476007)(6512007)(5660300002)(52116002)(8676002)(16526019)(316002)(186003)(4744005)(478600001)(2906002)(6506007)(8936002)(6666004)(36756003)(2616005)(956004)(55236004)(16060500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 8tfoRQ9WhgRoi5dE8zZsXptgJ/N+U4y45piIC8yvYh9asWK3ZPiNdVWzevuuZRniENeWFGsgAxfoZzKCUXUuaGEGLXSZYH2nT4GKfhiQZoZVzUnUaAIRh03/x73XXtypBrkU9BTexx0PqUhxTMaVnZEmGjVjeQ7YGkTnxVy0lap6MJ7kmMDe6RFbE8Fi5HvHJTi7JyRxkgVbsxofyG1uWZD0e9XNOgq4Udk33CRftxG1cxyzxy/cKmQ7j3NHPLeYb0T5OnuN055Z3g+CZacdGCdI2hlI75zHhx1AcX/Z7QCj5KZ7Bbcy6eTcjU7xmeFQB67Feg2HsNATavK8oK38zcjO4u34BwYwxHB4p3ytZ9jUK3TQ8nUGKAzj+/FgolVK5vsPIVyHQFCR8HtZoA7cdrJAzS1UzUUK15z3cxjRIgY7NgPId/bbtCF5Ao4dlC2rShMVOoRGW71fp6Mm05C5hTNb5rin4uBxApcIJ+7yKTI= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: d30ae6d7-c0e8-4e32-b997-08d829fa74ef X-MS-Exchange-CrossTenant-AuthSource: HE1PR0402MB3514.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jul 2020 02:38:15.9272 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: xEC5grSgCIlCxeCX5jtiLJHCcjvbESlObMF1fu6c6mRVZigFV2UogDqd4WbipPqe X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0401MB2297 X-PDR: PASS X-Source-IP: 62.140.7.102 X-ServerName: de-smtp-delivery-102.mimecast.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ip4:185.28.196.15 ip4:94.236.119.58 ip4:94.236.119.5 ip4:185.28.196.84 ip4:185.28.196.85 ip4:185.28.196.86 ip4:195.135.220.2 ip4:195.135.220.15 include:de._netblocks.mimecast.com include:amazonses.com include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9684 signatures=668680 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 malwarescore=0 priorityscore=30 suspectscore=0 phishscore=0 bulkscore=0 mlxscore=0 clxscore=578 adultscore=0 mlxlogscore=950 spamscore=0 lowpriorityscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007170016 X-Spam: Clean Cc: linux-kernel@vger.kernel.org, ocfs2-devel@oss.oracle.com Subject: [Ocfs2-devel] [PATCH] ocfs2: fix remounting needed after setfacl command X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9684 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=100 phishscore=0 malwarescore=0 suspectscore=0 mlxlogscore=-1000 spamscore=100 mlxscore=100 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007170018 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9684 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=100 suspectscore=0 priorityscore=1501 bulkscore=0 adultscore=0 lowpriorityscore=0 phishscore=0 spamscore=100 impostorscore=0 malwarescore=0 mlxlogscore=-1000 clxscore=1015 mlxscore=100 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007170018 When use setfacl command to change a file's acl, the user cannot get the latest acl information from the file via getfacl command, until remounting the file system. e.g. setfacl -m u:ivan:rw /ocfs2/ivan getfacl /ocfs2/ivan getfacl: Removing leading '/' from absolute path names file: ocfs2/ivan owner: root group: root user::rw- group::r-- mask::r-- other::r-- The latest acl record("u:ivan:rw") cannot be returned via getfacl command until remounting. Signed-off-by: Gang He Reviewed-by: Joseph Qi --- fs/ocfs2/acl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/ocfs2/acl.c b/fs/ocfs2/acl.c index bb981ec76456..7b07f5df3a29 100644 --- a/fs/ocfs2/acl.c +++ b/fs/ocfs2/acl.c @@ -256,6 +256,8 @@ static int ocfs2_set_acl(handle_t *handle, ret = ocfs2_xattr_set(inode, name_index, "", value, size, 0); kfree(value); + if (!ret) + set_cached_acl(inode, type, acl); return ret; }