From patchwork Tue Feb 28 14:57:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 9595877 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 2A77760578 for ; Tue, 28 Feb 2017 14:58:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 203F7284F5 for ; Tue, 28 Feb 2017 14:58:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 14BB8284EF; Tue, 28 Feb 2017 14:58:13 +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_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable 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 C0D5D28528 for ; Tue, 28 Feb 2017 14:58:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752316AbdB1O6H (ORCPT ); Tue, 28 Feb 2017 09:58:07 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:54256 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751810AbdB1O6E (ORCPT ); Tue, 28 Feb 2017 09:58:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:To:From:Sender:Reply-To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Zyif8mnZjg8KwpGEaIBzGNPQ8/ABnq/GDDJisi7tPCY=; b=T3SvHx7TrTphvrU2UcataTnaG P+dijFguv2LXh4pZpuIFas2dZVF+htZcCqaac4HbEVK5BDT7VWZRZOfHeU+iPjkbsW6xBy78EENYu FZGDD2d/U2fgUlwhDfMvfoak8O8BU/RZp4B354yelOwU84wqno3QWlcpW8OPeCB/cqAPGpNd5vo8P aHvtKrt9NsVCqIqc8p7g80bk6W8Y54sBZJI19O7H0QulQwdjvVZ4aeXlw4hHiSQbSS5AxhqJyONCW TjnrUukMbSMU2tP95F/yfW7rhOC+biixLEZc8rrd84Q0qOidkqbbR+PDEYVrAqLT/S5miafxG8HvC EiFuZfqYw==; Received: from [8.25.222.2] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.87 #1 (Red Hat Linux)) id 1cijDd-0006RY-Pg; Tue, 28 Feb 2017 14:57:37 +0000 From: Christoph Hellwig To: linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-block@vger.kernel.org Subject: [PATCH 01/12] uapi/fs: add O_ATOMIC to the open flags Date: Tue, 28 Feb 2017 06:57:26 -0800 Message-Id: <20170228145737.19016-2-hch@lst.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170228145737.19016-1-hch@lst.de> References: <20170228145737.19016-1-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Christoph Hellwig --- fs/fcntl.c | 3 ++- include/uapi/asm-generic/fcntl.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/fcntl.c b/fs/fcntl.c index e1c54f20325c..ca5d228be7ea 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c @@ -741,7 +741,7 @@ static int __init fcntl_init(void) * Exceptions: O_NONBLOCK is a two bit define on parisc; O_NDELAY * is defined as O_NONBLOCK on some platforms and not on others. */ - BUILD_BUG_ON(21 - 1 /* for O_RDONLY being 0 */ != HWEIGHT32( + BUILD_BUG_ON(22 - 1 /* for O_RDONLY being 0 */ != HWEIGHT32( O_RDONLY | O_WRONLY | O_RDWR | O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC | O_APPEND | /* O_NONBLOCK | */ @@ -749,6 +749,7 @@ static int __init fcntl_init(void) O_DIRECT | O_LARGEFILE | O_DIRECTORY | O_NOFOLLOW | O_NOATIME | O_CLOEXEC | __FMODE_EXEC | O_PATH | __O_TMPFILE | + O_ATOMIC | __FMODE_NONOTIFY )); diff --git a/include/uapi/asm-generic/fcntl.h b/include/uapi/asm-generic/fcntl.h index e063effe0cc1..26ab7622238a 100644 --- a/include/uapi/asm-generic/fcntl.h +++ b/include/uapi/asm-generic/fcntl.h @@ -92,6 +92,8 @@ #define O_TMPFILE (__O_TMPFILE | O_DIRECTORY) #define O_TMPFILE_MASK (__O_TMPFILE | O_DIRECTORY | O_CREAT) +#define O_ATOMIC 040000000 + #ifndef O_NDELAY #define O_NDELAY O_NONBLOCK #endif