diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-05-08 17:41:05 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-05-08 17:41:05 -0700 |
commit | e515f048c46e457ef61ce9c8b56bd36e825a48a0 (patch) | |
tree | fc1598f464fa4933c3245619b7a7bbb69fe4649e /fs/xfs/xfs_rename.c | |
parent | 601e7f024edbea8018de34c83a7398623214e636 (diff) | |
parent | e63a3690013a475746ad2cea998ebb534d825704 (diff) | |
download | kernel-crypto-e515f048c46e457ef61ce9c8b56bd36e825a48a0.tar.gz kernel-crypto-e515f048c46e457ef61ce9c8b56bd36e825a48a0.tar.xz kernel-crypto-e515f048c46e457ef61ce9c8b56bd36e825a48a0.zip |
Merge git://oss.sgi.com:8090/xfs-2.6
* git://oss.sgi.com:8090/xfs-2.6:
[XFS] Fix a possible metadata buffer (AGFL) refcount leak when fixing an
[XFS] Fix a project quota space accounting leak on rename.
[XFS] Fix a possible forced shutdown due to mishandling write barriers
Diffstat (limited to 'fs/xfs/xfs_rename.c')
-rw-r--r-- | fs/xfs/xfs_rename.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/xfs/xfs_rename.c b/fs/xfs/xfs_rename.c index 81a05cfd77d..1f148762eb2 100644 --- a/fs/xfs/xfs_rename.c +++ b/fs/xfs/xfs_rename.c @@ -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); |