* [PATCH] xfs: remove xfs_iput_new
@ 2010-06-11 16:18 Christoph Hellwig
2010-06-15 1:53 ` Dave Chinner
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2010-06-11 16:18 UTC (permalink / raw)
To: xfs
We never get an i_mode of 0 or a locked VFS inode until we pass in the
XFS_IGET_CREATE flag to xfs_iget, which makes xfs_iput_new equivalent to
xfs_iput for the only caller.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: xfs/fs/xfs/linux-2.6/xfs_export.c
===================================================================
--- xfs.orig/fs/xfs/linux-2.6/xfs_export.c 2010-06-09 15:24:59.480253950 +0200
+++ xfs/fs/xfs/linux-2.6/xfs_export.c 2010-06-09 15:25:16.668003845 +0200
@@ -148,7 +148,7 @@ xfs_nfs_get_inode(
}
if (ip->i_d.di_gen != generation) {
- xfs_iput_new(ip, XFS_ILOCK_SHARED);
+ xfs_iput(ip, XFS_ILOCK_SHARED);
return ERR_PTR(-ENOENT);
}
Index: xfs/fs/xfs/xfs_iget.c
===================================================================
--- xfs.orig/fs/xfs/xfs_iget.c 2010-06-09 15:24:59.492254229 +0200
+++ xfs/fs/xfs/xfs_iget.c 2010-06-09 15:25:11.454004125 +0200
@@ -439,29 +439,6 @@ xfs_iput(xfs_inode_t *ip,
}
/*
- * Special iput for brand-new inodes that are still locked
- */
-void
-xfs_iput_new(
- xfs_inode_t *ip,
- uint lock_flags)
-{
- struct inode *inode = VFS_I(ip);
-
- xfs_itrace_entry(ip);
-
- if ((ip->i_d.di_mode == 0)) {
- ASSERT(!xfs_iflags_test(ip, XFS_IRECLAIMABLE));
- make_bad_inode(inode);
- }
- if (inode->i_state & I_NEW)
- unlock_new_inode(inode);
- if (lock_flags)
- xfs_iunlock(ip, lock_flags);
- IRELE(ip);
-}
-
-/*
* This is called free all the memory associated with an inode.
* It must free the inode itself and any buffers allocated for
* if_extents/if_data and if_broot. It must also free the lock
Index: xfs/fs/xfs/xfs_inode.h
===================================================================
--- xfs.orig/fs/xfs/xfs_inode.h 2010-06-09 15:24:59.506253740 +0200
+++ xfs/fs/xfs/xfs_inode.h 2010-06-09 15:25:14.794005243 +0200
@@ -444,7 +444,6 @@ static inline void xfs_ifunlock(xfs_inod
int xfs_iget(struct xfs_mount *, struct xfs_trans *, xfs_ino_t,
uint, uint, xfs_inode_t **, xfs_daddr_t);
void xfs_iput(xfs_inode_t *, uint);
-void xfs_iput_new(xfs_inode_t *, uint);
void xfs_ilock(xfs_inode_t *, uint);
int xfs_ilock_nowait(xfs_inode_t *, uint);
void xfs_iunlock(xfs_inode_t *, uint);
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] xfs: remove xfs_iput_new
2010-06-11 16:18 [PATCH] xfs: remove xfs_iput_new Christoph Hellwig
@ 2010-06-15 1:53 ` Dave Chinner
2010-06-19 20:35 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Dave Chinner @ 2010-06-15 1:53 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
On Fri, Jun 11, 2010 at 12:18:24PM -0400, Christoph Hellwig wrote:
> We never get an i_mode of 0 or a locked VFS inode until we pass in the
> XFS_IGET_CREATE flag to xfs_iget, which makes xfs_iput_new equivalent to
> xfs_iput for the only caller.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xfs: remove xfs_iput_new
2010-06-15 1:53 ` Dave Chinner
@ 2010-06-19 20:35 ` Christoph Hellwig
0 siblings, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2010-06-19 20:35 UTC (permalink / raw)
To: Dave Chinner; +Cc: Christoph Hellwig, xfs
On Tue, Jun 15, 2010 at 11:53:00AM +1000, Dave Chinner wrote:
> On Fri, Jun 11, 2010 at 12:18:24PM -0400, Christoph Hellwig wrote:
> > We never get an i_mode of 0 or a locked VFS inode until we pass in the
> > XFS_IGET_CREATE flag to xfs_iget, which makes xfs_iput_new equivalent to
> > xfs_iput for the only caller.
> >
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
>
> Reviewed-by: Dave Chinner <dchinner@redhat.com>
There's in fact no need to lock the inode at all here, so this can
be replaced with IRELE. I'll send an updated version with my next
batch of patches.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-06-19 20:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-11 16:18 [PATCH] xfs: remove xfs_iput_new Christoph Hellwig
2010-06-15 1:53 ` Dave Chinner
2010-06-19 20:35 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox