All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: xfs@oss.sgi.com
Subject: [PATCH] remove unused filp from ioctl functions
Date: Fri, 10 Nov 2006 21:28:59 -0600	[thread overview]
Message-ID: <4555437B.4040904@sandeen.net> (raw)

There's a stuct file * passed around the ioctl code that is never
used... just takes up precious stack space near as I can tell :)

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>

 linux-2.4/xfs_ioctl.c |   16 +++++-----------
 linux-2.6/xfs_ioctl.c |   16 +++++-----------
 2 files changed, 10 insertions(+), 22 deletions(-)

Index: xfs-linux-allpatches/linux-2.4/xfs_ioctl.c
===================================================================
--- xfs-linux-allpatches.orig/linux-2.4/xfs_ioctl.c
+++ xfs-linux-allpatches/linux-2.4/xfs_ioctl.c
@@ -349,7 +349,6 @@ STATIC int
 xfs_readlink_by_handle(
 	xfs_mount_t		*mp,
 	unsigned long		arg,
-	struct file		*parfilp,
 	struct inode		*parinode)
 {
 	int			error;
@@ -400,7 +399,6 @@ STATIC int
 xfs_fssetdm_by_handle(
 	xfs_mount_t		*mp,
 	unsigned long		arg,
-	struct file		*parfilp,
 	struct inode		*parinode)
 {
 	int			error;
@@ -442,7 +440,6 @@ STATIC int
 xfs_attrlist_by_handle(
 	xfs_mount_t		*mp,
 	unsigned long		arg,
-	struct file		*parfilp,
 	struct inode		*parinode)
 {
 	int			error;
@@ -563,7 +560,6 @@ STATIC int
 xfs_attrmulti_by_handle(
 	xfs_mount_t		*mp,
 	unsigned long		arg,
-	struct file		*parfilp,
 	struct inode		*parinode)
 {
 	int			error;
@@ -683,7 +679,6 @@ xfs_ioc_xattr(
 STATIC int
 xfs_ioc_getbmap(
 	bhv_desc_t		*bdp,
-	struct file		*filp,
 	int			flags,
 	unsigned int		cmd,
 	unsigned long		arg);
@@ -779,7 +774,7 @@ xfs_ioctl(
 
 	case XFS_IOC_GETBMAP:
 	case XFS_IOC_GETBMAPA:
-		return xfs_ioc_getbmap(bdp, filp, ioflags, cmd, arg);
+		return xfs_ioc_getbmap(bdp, ioflags, cmd, arg);
 
 	case XFS_IOC_GETBMAPX:
 		return xfs_ioc_getbmapx(bdp, arg);
@@ -793,16 +788,16 @@ xfs_ioctl(
 		return xfs_open_by_handle(mp, arg, filp, inode);
 
 	case XFS_IOC_FSSETDM_BY_HANDLE:
-		return xfs_fssetdm_by_handle(mp, arg, filp, inode);
+		return xfs_fssetdm_by_handle(mp, arg, inode);
 
 	case XFS_IOC_READLINK_BY_HANDLE:
-		return xfs_readlink_by_handle(mp, arg, filp, inode);
+		return xfs_readlink_by_handle(mp, arg, inode);
 
 	case XFS_IOC_ATTRLIST_BY_HANDLE:
-		return xfs_attrlist_by_handle(mp, arg, filp, inode);
+		return xfs_attrlist_by_handle(mp, arg, inode);
 
 	case XFS_IOC_ATTRMULTI_BY_HANDLE:
-		return xfs_attrmulti_by_handle(mp, arg, filp, inode);
+		return xfs_attrmulti_by_handle(mp, arg, inode);
 
 	case XFS_IOC_SWAPEXT: {
 		error = xfs_swapext((struct xfs_swapext *)arg);
@@ -1258,7 +1253,6 @@ xfs_ioc_xattr(
 STATIC int
 xfs_ioc_getbmap(
 	bhv_desc_t		*bdp,
-	struct file		*filp,
 	int			ioflags,
 	unsigned int		cmd,
 	unsigned long		arg)
Index: xfs-linux-allpatches/linux-2.6/xfs_ioctl.c
===================================================================
--- xfs-linux-allpatches.orig/linux-2.6/xfs_ioctl.c
+++ xfs-linux-allpatches/linux-2.6/xfs_ioctl.c
@@ -352,7 +352,6 @@ STATIC int
 xfs_readlink_by_handle(
 	xfs_mount_t		*mp,
 	void			__user *arg,
-	struct file		*parfilp,
 	struct inode		*parinode)
 {
 	int			error;
@@ -403,7 +402,6 @@ STATIC int
 xfs_fssetdm_by_handle(
 	xfs_mount_t		*mp,
 	void			__user *arg,
-	struct file		*parfilp,
 	struct inode		*parinode)
 {
 	int			error;
@@ -445,7 +443,6 @@ STATIC int
 xfs_attrlist_by_handle(
 	xfs_mount_t		*mp,
 	void			__user *arg,
-	struct file		*parfilp,
 	struct inode		*parinode)
 {
 	int			error;
@@ -566,7 +563,6 @@ STATIC int
 xfs_attrmulti_by_handle(
 	xfs_mount_t		*mp,
 	void			__user *arg,
-	struct file		*parfilp,
 	struct inode		*parinode)
 {
 	int			error;
@@ -686,7 +682,6 @@ xfs_ioc_xattr(
 STATIC int
 xfs_ioc_getbmap(
 	bhv_desc_t		*bdp,
-	struct file		*filp,
 	int			flags,
 	unsigned int		cmd,
 	void			__user *arg);
@@ -785,7 +780,7 @@ xfs_ioctl(
 
 	case XFS_IOC_GETBMAP:
 	case XFS_IOC_GETBMAPA:
-		return xfs_ioc_getbmap(bdp, filp, ioflags, cmd, arg);
+		return xfs_ioc_getbmap(bdp, ioflags, cmd, arg);
 
 	case XFS_IOC_GETBMAPX:
 		return xfs_ioc_getbmapx(bdp, arg);
@@ -799,16 +794,16 @@ xfs_ioctl(
 		return xfs_open_by_handle(mp, arg, filp, inode);
 
 	case XFS_IOC_FSSETDM_BY_HANDLE:
-		return xfs_fssetdm_by_handle(mp, arg, filp, inode);
+		return xfs_fssetdm_by_handle(mp, arg, inode);
 
 	case XFS_IOC_READLINK_BY_HANDLE:
-		return xfs_readlink_by_handle(mp, arg, filp, inode);
+		return xfs_readlink_by_handle(mp, arg, inode);
 
 	case XFS_IOC_ATTRLIST_BY_HANDLE:
-		return xfs_attrlist_by_handle(mp, arg, filp, inode);
+		return xfs_attrlist_by_handle(mp, arg, inode);
 
 	case XFS_IOC_ATTRMULTI_BY_HANDLE:
-		return xfs_attrmulti_by_handle(mp, arg, filp, inode);
+		return xfs_attrmulti_by_handle(mp, arg, inode);
 
 	case XFS_IOC_SWAPEXT: {
 		error = xfs_swapext((struct xfs_swapext __user *)arg);
@@ -1278,7 +1273,6 @@ xfs_ioc_xattr(
 STATIC int
 xfs_ioc_getbmap(
 	bhv_desc_t		*bdp,
-	struct file		*filp,
 	int			ioflags,
 	unsigned int		cmd,
 	void			__user *arg)

             reply	other threads:[~2006-11-11  3:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-11  3:28 Eric Sandeen [this message]
2006-11-11 10:56 ` [PATCH] remove unused filp from ioctl functions Christoph Hellwig
2006-11-11 17:12   ` Eric Sandeen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4555437B.4040904@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.