Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754221AbcLSTn1 (ORCPT ); Mon, 19 Dec 2016 14:43:27 -0500 Received: from mga04.intel.com ([192.55.52.120]:6214 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751180AbcLSTnU (ORCPT ); Mon, 19 Dec 2016 14:43:20 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,375,1477983600"; d="scan'208";a="44863811" From: Scott Bauer To: linux-nvme@lists.infradead.org Cc: Rafael.Antognolli@intel.com, axboe@fb.com, keith.busch@intel.com, jonathan.derrick@intel.com, viro@zeniv.linux.org.uk, hch@infradead.org, linux-kernel@vger.kernel.org, sagi@grimberg.me, Scott Bauer Subject: [PATCH v3 3/5] fs: Wire up SED/Opal to ioctl Date: Mon, 19 Dec 2016 12:35:47 -0700 Message-Id: <1482176149-2257-4-git-send-email-scott.bauer@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1482176149-2257-1-git-send-email-scott.bauer@intel.com> References: <1482176149-2257-1-git-send-email-scott.bauer@intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1465 Lines: 54 Adds a new sed_context pointer to file struct, for char devs who wish to suppor SED. Adds ioctl handling code. Signed-off-by: Scott Bauer Signed-off-by: Rafael Antognolli --- fs/ioctl.c | 3 +++ include/linux/fs.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/fs/ioctl.c b/fs/ioctl.c index cb9b029..77def42 100644 --- a/fs/ioctl.c +++ b/fs/ioctl.c @@ -15,6 +15,7 @@ #include #include #include +#include #include "internal.h" #include @@ -679,6 +680,8 @@ int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd, default: if (S_ISREG(inode->i_mode)) error = file_ioctl(filp, cmd, arg); + else if (is_sed_ioctl(cmd)) + error = fdev_sed_ioctl(filp, cmd, arg); else error = vfs_ioctl(filp, cmd, arg); break; diff --git a/include/linux/fs.h b/include/linux/fs.h index 2ba0743..75a99e5 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -55,6 +55,7 @@ struct workqueue_struct; struct iov_iter; struct fscrypt_info; struct fscrypt_operations; +struct sed_context; extern void __init inode_init(void); extern void __init inode_init_early(void); @@ -853,6 +854,7 @@ struct file { #ifdef CONFIG_SECURITY void *f_security; #endif + struct sed_context *f_sedctx; /* needed for tty driver, and maybe others */ void *private_data; -- 2.7.4