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,7 +72,8 @@ xfs_open( ...@@ -72,7 +72,8 @@ 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);
(void)xfs_da_reada_buf(NULL, ip, 0, XFS_DATA_FORK); if (ip->i_d.di_nextents > 0)
(void)xfs_da_reada_buf(NULL, ip, 0, XFS_DATA_FORK);
xfs_iunlock(ip, mode); xfs_iunlock(ip, mode);
} }
return 0; return 0;
......
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