Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
676db7e6
Commit
676db7e6
authored
Sep 24, 2003
by
Stephen Lord
Committed by
Stephen Lord
Sep 24, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XFS] remove dead function xfs_trans_iput
SGI Modid: 2.5.x-xfs:slinx:158917a
parent
f7b7ed34
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
101 deletions
+0
-101
fs/xfs/xfs_trans.h
fs/xfs/xfs_trans.h
+0
-1
fs/xfs/xfs_trans_inode.c
fs/xfs/xfs_trans_inode.c
+0
-100
No files found.
fs/xfs/xfs_trans.h
View file @
676db7e6
...
...
@@ -995,7 +995,6 @@ void xfs_trans_dquot_buf(xfs_trans_t *, struct xfs_buf *, uint);
void
xfs_trans_inode_alloc_buf
(
xfs_trans_t
*
,
struct
xfs_buf
*
);
int
xfs_trans_iget
(
struct
xfs_mount
*
,
xfs_trans_t
*
,
xfs_ino_t
,
uint
,
struct
xfs_inode
**
);
void
xfs_trans_iput
(
xfs_trans_t
*
,
struct
xfs_inode
*
,
uint
);
void
xfs_trans_ijoin
(
xfs_trans_t
*
,
struct
xfs_inode
*
,
uint
);
void
xfs_trans_ihold
(
xfs_trans_t
*
,
struct
xfs_inode
*
);
void
xfs_trans_ihold_release
(
xfs_trans_t
*
,
struct
xfs_inode
*
);
...
...
fs/xfs/xfs_trans_inode.c
View file @
676db7e6
...
...
@@ -187,106 +187,6 @@ xfs_trans_iget(
}
/*
* Release the inode ip which was previously acquired with xfs_trans_iget()
* or added with xfs_trans_ijoin(). This will decrement the lock
* recursion count of the inode item. If the count goes to less than 0,
* the inode will be unlocked and disassociated from the transaction.
*
* If the inode has been modified within the transaction, it will not be
* unlocked until the transaction commits.
*/
void
xfs_trans_iput
(
xfs_trans_t
*
tp
,
xfs_inode_t
*
ip
,
uint
lock_flags
)
{
xfs_inode_log_item_t
*
iip
;
xfs_log_item_desc_t
*
lidp
;
/*
* If the transaction pointer is NULL, just call xfs_iput().
*/
if
(
tp
==
NULL
)
{
xfs_iput
(
ip
,
lock_flags
);
}
ASSERT
(
ip
->
i_transp
==
tp
);
iip
=
ip
->
i_itemp
;
ASSERT
(
iip
!=
NULL
);
/*
* Find the item descriptor pointing to this inode's
* log item. It must be there.
*/
lidp
=
xfs_trans_find_item
(
tp
,
(
xfs_log_item_t
*
)
iip
);
ASSERT
(
lidp
!=
NULL
);
ASSERT
(
lidp
->
lid_item
==
(
xfs_log_item_t
*
)
iip
);
/*
* Be consistent about the bookkeeping for the inode's
* io lock, but it doesn't mean much really.
*/
ASSERT
((
iip
->
ili_flags
&
XFS_ILI_IOLOCKED_ANY
)
!=
XFS_ILI_IOLOCKED_ANY
);
if
(
lock_flags
&
(
XFS_IOLOCK_EXCL
|
XFS_IOLOCK_SHARED
))
{
ASSERT
(
iip
->
ili_flags
&
XFS_ILI_IOLOCKED_ANY
);
ASSERT
((
!
(
lock_flags
&
XFS_IOLOCK_EXCL
))
||
(
iip
->
ili_flags
&
XFS_ILI_IOLOCKED_EXCL
));
ASSERT
((
!
(
lock_flags
&
XFS_IOLOCK_SHARED
))
||
(
iip
->
ili_flags
&
(
XFS_ILI_IOLOCKED_EXCL
|
XFS_ILI_IOLOCKED_SHARED
)));
if
(
iip
->
ili_iolock_recur
>
0
)
{
iip
->
ili_iolock_recur
--
;
}
}
/*
* If the release is just for a recursive lock on the inode lock,
* then decrement the count and return. We can assert that
* the caller is dropping an EXCL lock on the inode, because
* inode must be locked EXCL within transactions.
*/
ASSERT
(
lock_flags
&
XFS_ILOCK_EXCL
);
if
(
iip
->
ili_ilock_recur
>
0
)
{
iip
->
ili_ilock_recur
--
;
return
;
}
ASSERT
(
iip
->
ili_iolock_recur
==
0
);
/*
* If the inode was dirtied within this transaction, it cannot
* be released until the transaction commits.
*/
if
(
lidp
->
lid_flags
&
XFS_LID_DIRTY
)
{
return
;
}
xfs_trans_free_item
(
tp
,
lidp
);
/*
* Clear the hold and iolocked flags in the inode log item.
* We wouldn't want the next user of the inode to
* get confused. Assert that if the iolocked flag is set
* in the item then we are unlocking it in the call to xfs_iput()
* below.
*/
ASSERT
((
!
(
iip
->
ili_flags
&
XFS_ILI_IOLOCKED_ANY
))
||
(
lock_flags
&
(
XFS_IOLOCK_EXCL
|
XFS_IOLOCK_SHARED
)));
if
(
iip
->
ili_flags
&
(
XFS_ILI_HOLD
|
XFS_ILI_IOLOCKED_ANY
))
{
iip
->
ili_flags
&=
~
(
XFS_ILI_HOLD
|
XFS_ILI_IOLOCKED_ANY
);
}
/*
* Unlike xfs_brelse() the inode log item cannot be
* freed, because it is embedded within the inode.
* All we have to do is release the inode.
*/
xfs_iput
(
ip
,
lock_flags
);
return
;
}
/*
* Add the locked inode to the transaction.
* The inode must be locked, and it cannot be associated with any
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment