* [PATCH] remove unused filp from ioctl functions
@ 2006-11-11 3:28 Eric Sandeen
2006-11-11 10:56 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Eric Sandeen @ 2006-11-11 3:28 UTC (permalink / raw)
To: xfs
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)
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] remove unused filp from ioctl functions
2006-11-11 3:28 [PATCH] remove unused filp from ioctl functions Eric Sandeen
@ 2006-11-11 10:56 ` Christoph Hellwig
2006-11-11 17:12 ` Eric Sandeen
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2006-11-11 10:56 UTC (permalink / raw)
To: Eric Sandeen; +Cc: xfs
On Fri, Nov 10, 2006 at 09:28:59PM -0600, Eric Sandeen wrote:
> 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 :)
While you're at it kill the inode paramater anyway, it can be retrieved
from the vnode by trivial address arithmetics.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] remove unused filp from ioctl functions
2006-11-11 10:56 ` Christoph Hellwig
@ 2006-11-11 17:12 ` Eric Sandeen
0 siblings, 0 replies; 3+ messages in thread
From: Eric Sandeen @ 2006-11-11 17:12 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
Christoph Hellwig wrote:
> On Fri, Nov 10, 2006 at 09:28:59PM -0600, Eric Sandeen wrote:
>> 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 :)
>
> While you're at it kill the inode paramater anyway, it can be retrieved
> from the vnode by trivial address arithmetics.
Hadn't noticed, let me look into that.
-Eric
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-11-11 17:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-11 3:28 [PATCH] remove unused filp from ioctl functions Eric Sandeen
2006-11-11 10:56 ` Christoph Hellwig
2006-11-11 17:12 ` Eric Sandeen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox