]> err.no Git - linux-2.6/blobdiff - fs/reiserfs/inode.c
/spare/repo/netdev-2.6 branch 'sis190'
[linux-2.6] / fs / reiserfs / inode.c
index 1aaf2c7d44e69e3a4b1a282bf0dc3023b88a3bfc..ff291c973a567f4d9226c3840c98ea002c4ed823 100644 (file)
@@ -1980,7 +1980,17 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th,
       out_inserted_sd:
        inode->i_nlink = 0;
        th->t_trans_id = 0;     /* so the caller can't use this handle later */
-       iput(inode);
+
+       /* If we were inheriting an ACL, we need to release the lock so that
+        * iput doesn't deadlock in reiserfs_delete_xattrs. The locking
+        * code really needs to be reworked, but this will take care of it
+        * for now. -jeffm */
+       if (REISERFS_I(dir)->i_acl_default && !IS_ERR(REISERFS_I(dir)->i_acl_default)) {
+               reiserfs_write_unlock_xattrs(dir->i_sb);
+               iput(inode);
+               reiserfs_write_lock_xattrs(dir->i_sb);
+       } else
+               iput(inode);
        return err;
 }