Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26565
b: refs/heads/master
c: b1ecdda
h: refs/heads/master
i:
  26563: 2239710
v: v3
  • Loading branch information
Nathan Scott committed May 8, 2006
1 parent 73ea90d commit dcbbd5f
Show file tree
Hide file tree
Showing 3 changed files with 14 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: d08d389d5aef0509edba7ee42cd6c6a3998fee22
refs/heads/master: b1ecdda9313ec5d2f971993f44f6b657acf70cff
12 changes: 12 additions & 0 deletions trunk/fs/xfs/xfs_rename.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,18 @@ xfs_rename(
}
}

/*
* If we are using project inheritance, we only allow renames
* into our tree when the project IDs are the same; else the
* tree quota mechanism would be circumvented.
*/
if (unlikely((target_dp->i_d.di_flags & XFS_DIFLAG_PROJINHERIT) &&
(target_dp->i_d.di_projid != src_ip->i_d.di_projid))) {
error = XFS_ERROR(EXDEV);
xfs_rename_unlock4(inodes, XFS_ILOCK_SHARED);
goto rele_return;
}

new_parent = (src_dp != target_dp);
src_is_directory = ((src_ip->i_d.di_mode & S_IFMT) == S_IFDIR);

Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/xfs/xfs_vnodeops.c
Original file line number Diff line number Diff line change
Expand Up @@ -2663,7 +2663,7 @@ xfs_link(
*/
if (unlikely((tdp->i_d.di_flags & XFS_DIFLAG_PROJINHERIT) &&
(tdp->i_d.di_projid != sip->i_d.di_projid))) {
error = XFS_ERROR(EPERM);
error = XFS_ERROR(EXDEV);
goto error_return;
}

Expand Down

0 comments on commit dcbbd5f

Please sign in to comment.