From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=BAYES_00, CHARSET_FARAWAY_HEADER,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ACFA6C48BE5 for ; Thu, 17 Jun 2021 01:14:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 895D5613BF for ; Thu, 17 Jun 2021 01:14:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231831AbhFQBQN (ORCPT ); Wed, 16 Jun 2021 21:16:13 -0400 Received: from regular1.263xmail.com ([211.150.70.196]:48502 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230087AbhFQBQN (ORCPT ); Wed, 16 Jun 2021 21:16:13 -0400 Received: from localhost (unknown [192.168.167.16]) by regular1.263xmail.com (Postfix) with ESMTP id B7EC81F13; Thu, 17 Jun 2021 09:13:52 +0800 (CST) X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-ADDR-CHECKED4: 1 X-SKE-CHECKED: 1 X-ABS-CHECKED: 1 X-ANTISPAM-LEVEL: 2 Received: from manjaro.uniontech.com (unknown [58.246.122.242]) by smtp.263.net (postfix) whith ESMTP id P16483T139918873450240S1623892432375978_; Thu, 17 Jun 2021 09:13:53 +0800 (CST) X-IP-DOMAINF: 1 X-UNIQUE-TAG: <7fa8fb32e55cf830bc9bbb2ad2148f8b> X-RL-SENDER: chenli@uniontech.com X-SENDER: chenli@uniontech.com X-LOGIN-NAME: chenli@uniontech.com X-FST-TO: viro@zeniv.linux.org.uk X-RCPT-COUNT: 5 X-SENDER-IP: 58.246.122.242 X-ATTACHMENT-NUM: 0 X-System-Flag: 0 Date: Thu, 17 Jun 2021 09:13:52 +0800 Message-ID: <871r91gunj.wl-chenli@uniontech.com> From: Chen Li To: Al Viro Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Christian Brauner , Andrew Morton Subject: Re: [PATCH] ramfs: skip mknod if inode already =?GB2312?B?ZXhp?= =?GB2312?B?c3RzLqG+x+vXotLio6zTyrz+08l2aXJvQGZ0cC5saW51eC5vcmcudWu0+rei?= =?GB2312?B?ob8=?= In-Reply-To: References: <874kdyh65j.wl-chenli@uniontech.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Wed, 16 Jun 2021 20:16:58 +0800, Al Viro wrote: > > On Wed, Jun 16, 2021 at 10:53:12AM +0800, Chen Li wrote: > > > > It's possible we try to mknod a dentry, which have > > already bound to an inode, just skip it. > > Caller should have checked may_create(), which includes EEXIST handling. > NAKed-by: Al Viro Don't know may_create before, thanks! > > Incidentally, if it ever had been called that way, your variant would > leak inode. Not the main problem, though... > >