Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752437AbbKJKpE (ORCPT ); Tue, 10 Nov 2015 05:45:04 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:57073 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752073AbbKJKpC (ORCPT ); Tue, 10 Nov 2015 05:45:02 -0500 X-AuditID: cbfee61b-f79d56d0000048c5-3f-5641caac853b From: Chao Yu To: Jaegeuk Kim Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] f2fs: fix to enable missing ioctl interfaces in ->compat_ioctl Date: Tue, 10 Nov 2015 18:44:20 +0800 Message-id: <01b801d11ba4$d8702630$89507290$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-index: AdEbpLhh0Wf1j/4JQq247ICD8lrVMQ== Content-language: zh-cn X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrJLMWRmVeSWpSXmKPExsVy+t9jQd01pxzDDE6sU7Z4sn4Ws8WlRe4W l3fNYXNg9ti0qpPNY/eCz0wenzfJBTBHcdmkpOZklqUW6dslcGXcP/6aveAqb8XEtk+MDYwr ubsYOTkkBEwkOg8+YISwxSQu3FvP1sXIxSEkMItR4n3vYnaQhJDAK0aJGRuyQGw2ARWJ5R3/ mUBsESD70KLLYDXMAh4SjR3fWUFsYYFQiSO/p7N0MXJwsAioSrSdSQYxeQUsJTYv0wCp4BUQ lPgx+R4LRKeWxPqdx5kgbHmJzWveMkOcoyCx4+xrRohNehIzb99jhKgRl9h45BbLBEagGxFG zUIyahaSUbOQtCxgZFnFKJFakFxQnJSea5SXWq5XnJhbXJqXrpecn7uJERzAz6R3MB7e5X6I UYCDUYmHd8I3hzAh1sSy4srcQ4wSHMxKIrz2L4BCvCmJlVWpRfnxRaU5qcWHGKU5WJTEefU9 jcKEBNITS1KzU1MLUotgskwcnFINjJUNcfOPBwYv8pmfFHb04oVtLq/85lmdOylTei19xiYL b/MNmvfvTve4k+kWe3h2hUzND/65XvmfP+lbf+PsKD3Z6dvJ1Xc21vLGAf51yntD5qbtmWiS y7dZu6Do1K1rVz7X63cmugjpP2zfl3cmreZc5qErcyeJa50JuHz/Yvh+biXmHzfOfVRiKc5I NNRiLipOBAAMAUqNXAIAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1938 Lines: 61 In 64-bit kernel f2fs can supports 32-bit ioctl system call by identifying encoded code which is converted from 32-bit one to 64-bit one in ->compat_ioctl. When we introduced new interfaces in ->ioctl, we forgot to enable them in ->compat_ioctl, so enable them for fixing. Signed-off-by: Chao Yu --- fs/f2fs/f2fs.h | 1 + fs/f2fs/file.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index b01ad51..06497eb 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -259,6 +259,7 @@ static inline bool __has_cursum_space(struct f2fs_summary_block *sum, int size, */ #define F2FS_IOC32_GETFLAGS FS_IOC32_GETFLAGS #define F2FS_IOC32_SETFLAGS FS_IOC32_SETFLAGS +#define F2FS_IOC32_GETVERSION FS_IOC32_GETVERSION #endif struct f2fs_defragment { diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 2f39298..3f1026c 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -1901,6 +1901,22 @@ long f2fs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) case F2FS_IOC32_SETFLAGS: cmd = F2FS_IOC_SETFLAGS; break; + case F2FS_IOC32_GETVERSION: + cmd = F2FS_IOC_GETVERSION; + break; + case F2FS_IOC_START_ATOMIC_WRITE: + case F2FS_IOC_COMMIT_ATOMIC_WRITE: + case F2FS_IOC_START_VOLATILE_WRITE: + case F2FS_IOC_RELEASE_VOLATILE_WRITE: + case F2FS_IOC_ABORT_VOLATILE_WRITE: + case F2FS_IOC_SHUTDOWN: + case F2FS_IOC_SET_ENCRYPTION_POLICY: + case F2FS_IOC_GET_ENCRYPTION_PWSALT: + case F2FS_IOC_GET_ENCRYPTION_POLICY: + case F2FS_IOC_GARBAGE_COLLECT: + case F2FS_IOC_WRITE_CHECKPOINT: + case F2FS_IOC_DEFRAGMENT: + break; default: return -ENOIOCTLCMD; } -- 2.6.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/