Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 221755
b: refs/heads/master
c: 785ce41
h: refs/heads/master
i:
  221753: f9f7ed1
  221751: eee22a2
v: v3
  • Loading branch information
Christoph Hellwig authored and Alex Elder committed Nov 10, 2010
1 parent 5136d0d commit 042eabd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bfe2741967eaa3434fa9b3d8f24b1422d4540e7d
refs/heads/master: 785ce41805ea7b6a9b2775ed9f4cf10cd7a90c03
8 changes: 7 additions & 1 deletion trunk/fs/xfs/xfs_filestream.c
Original file line number Diff line number Diff line change
Expand Up @@ -744,9 +744,15 @@ xfs_filestream_new_ag(
* If the file's parent directory is known, take its iolock in exclusive
* mode to prevent two sibling files from racing each other to migrate
* themselves and their parent to different AGs.
*
* Note that we lock the parent directory iolock inside the child
* iolock here. That's fine as we never hold both parent and child
* iolock in any other place. This is different from the ilock,
* which requires locking of the child after the parent for namespace
* operations.
*/
if (pip)
xfs_ilock(pip, XFS_IOLOCK_EXCL);
xfs_ilock(pip, XFS_IOLOCK_EXCL | XFS_IOLOCK_PARENT);

/*
* A new AG needs to be found for the file. If the file's parent
Expand Down

0 comments on commit 042eabd

Please sign in to comment.