From patchwork Thu Jul 6 02:23:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaegeuk Kim X-Patchwork-Id: 9827471 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 1CCC960351 for ; Thu, 6 Jul 2017 02:24:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4483E27DCD for ; Thu, 6 Jul 2017 02:23:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3935628397; Thu, 6 Jul 2017 02:23:42 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 F221027DCD for ; Thu, 6 Jul 2017 02:23:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752521AbdGFCX2 (ORCPT ); Wed, 5 Jul 2017 22:23:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:55746 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752086AbdGFCX2 (ORCPT ); Wed, 5 Jul 2017 22:23:28 -0400 Received: from localhost (unknown [104.132.0.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5809722B56; Thu, 6 Jul 2017 02:23:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5809722B56 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=jaegeuk@kernel.org From: Jaegeuk Kim To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Cc: Jaegeuk Kim Subject: [PATCH] f2fs: relax permission for atomic/volatile ioctls Date: Wed, 5 Jul 2017 19:23:26 -0700 Message-Id: <20170706022326.52594-1-jaegeuk@kernel.org> X-Mailer: git-send-email 2.13.0.rc1.294.g07d810a77f-goog Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch allows atomic/volatile ioctls for sqlite under sdcardfs. Signed-off-by: Jaegeuk Kim --- fs/f2fs/file.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index f5d6357e8360..dd8f5d2caa48 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -1587,9 +1587,6 @@ static int f2fs_ioc_start_atomic_write(struct file *filp) struct inode *inode = file_inode(filp); int ret; - if (!inode_owner_or_capable(inode)) - return -EACCES; - if (!S_ISREG(inode->i_mode)) return -EINVAL; @@ -1636,9 +1633,6 @@ static int f2fs_ioc_commit_atomic_write(struct file *filp) struct inode *inode = file_inode(filp); int ret; - if (!inode_owner_or_capable(inode)) - return -EACCES; - ret = mnt_want_write_file(filp); if (ret) return ret; @@ -1672,9 +1666,6 @@ static int f2fs_ioc_start_volatile_write(struct file *filp) struct inode *inode = file_inode(filp); int ret; - if (!inode_owner_or_capable(inode)) - return -EACCES; - if (!S_ISREG(inode->i_mode)) return -EINVAL; @@ -1707,9 +1698,6 @@ static int f2fs_ioc_release_volatile_write(struct file *filp) struct inode *inode = file_inode(filp); int ret; - if (!inode_owner_or_capable(inode)) - return -EACCES; - ret = mnt_want_write_file(filp); if (ret) return ret; @@ -1736,9 +1724,6 @@ static int f2fs_ioc_abort_volatile_write(struct file *filp) struct inode *inode = file_inode(filp); int ret; - if (!inode_owner_or_capable(inode)) - return -EACCES; - ret = mnt_want_write_file(filp); if (ret) return ret;