Commit 122f9617 authored by Glen Overby's avatar Glen Overby Committed by Stephen Lord

[XFS] In open, check the inode for extents after getting the shared lock on

the inode.  The inode could have changed since before the lock.

SGI Modid: 2.5.x-xfs:slinx:137931a
parent 96614b42
...@@ -72,6 +72,7 @@ xfs_open( ...@@ -72,6 +72,7 @@ xfs_open(
*/ */
if (vp->v_type == VDIR && ip->i_d.di_nextents > 0) { if (vp->v_type == VDIR && ip->i_d.di_nextents > 0) {
mode = xfs_ilock_map_shared(ip); mode = xfs_ilock_map_shared(ip);
if (ip->i_d.di_nextents > 0)
(void)xfs_da_reada_buf(NULL, ip, 0, XFS_DATA_FORK); (void)xfs_da_reada_buf(NULL, ip, 0, XFS_DATA_FORK);
xfs_iunlock(ip, mode); xfs_iunlock(ip, mode);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment