[lkml]   [2008]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[patch 85/83] XFS: Fix hang after disallowed rename across directory quota domains
    From: Dave Chinner <>

    commit 576a488a27f267af203f3ea69c700a1612335e9f upstream.

    When project quota is active and is being used for directory tree
    quota control, we disallow rename outside the current directory
    tree. This requires a check to be made after all the inodes
    involved in the rename are locked. We fail to unlock the inodes
    correctly if we disallow the rename when the target is outside the
    current directory tree. This results in a hang on the next access
    to the inodes involved in failed rename.

    Reported-by: Arkadiusz Miskiewicz <>
    Signed-off-by: Dave Chinner <>
    Tested-by: Arkadiusz Miskiewicz <>
    Signed-off-by: Lachlan McIlroy <>
    Signed-off-by: Greg Kroah-Hartman <>

    fs/xfs/xfs_rename.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/fs/xfs/xfs_rename.c
    +++ b/fs/xfs/xfs_rename.c
    @@ -212,7 +212,7 @@ xfs_rename(
    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);
    + xfs_rename_unlock4(inodes, XFS_ILOCK_EXCL);
    xfs_trans_cancel(tp, cancel_flags);
    goto std_return;

     \ /
      Last update: 2008-12-12 06:29    [W:0.023 / U:13.920 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site