ima: ecryptfs fix imbalance message
[safe/jmp/linux-2.6] / fs / ext3 / xattr.c
index d4a4f0e..545e37c 100644 (file)
@@ -463,7 +463,6 @@ static void ext3_xattr_update_super_block(handle_t *handle,
 
        if (ext3_journal_get_write_access(handle, EXT3_SB(sb)->s_sbh) == 0) {
                EXT3_SET_COMPAT_FEATURE(sb, EXT3_FEATURE_COMPAT_EXT_ATTR);
-               sb->s_dirt = 1;
                ext3_journal_dirty_metadata(handle, EXT3_SB(sb)->s_sbh);
        }
 }
@@ -498,7 +497,7 @@ ext3_xattr_release_block(handle_t *handle, struct inode *inode,
                error = ext3_journal_dirty_metadata(handle, bh);
                if (IS_SYNC(inode))
                        handle->h_sync = 1;
-               DQUOT_FREE_BLOCK(inode, 1);
+               vfs_dq_free_block(inode, 1);
                ea_bdebug(bh, "refcount now=%d; releasing",
                          le32_to_cpu(BHDR(bh)->h_refcount));
                if (ce)
@@ -774,7 +773,7 @@ inserted:
                                /* The old block is released after updating
                                   the inode. */
                                error = -EDQUOT;
-                               if (DQUOT_ALLOC_BLOCK(inode, 1))
+                               if (vfs_dq_alloc_block(inode, 1))
                                        goto cleanup;
                                error = ext3_journal_get_write_access(handle,
                                                                      new_bh);
@@ -848,7 +847,7 @@ cleanup:
        return error;
 
 cleanup_dquot:
-       DQUOT_FREE_BLOCK(inode, 1);
+       vfs_dq_free_block(inode, 1);
        goto cleanup;
 
 bad_block:
@@ -1000,6 +999,11 @@ ext3_xattr_set_handle(handle_t *handle, struct inode *inode, int name_index,
                        i.value = NULL;
                        error = ext3_xattr_block_set(handle, inode, &i, &bs);
                } else if (error == -ENOSPC) {
+                       if (EXT3_I(inode)->i_file_acl && !bs.s.base) {
+                               error = ext3_xattr_block_find(inode, &i, &bs);
+                               if (error)
+                                       goto cleanup;
+                       }
                        error = ext3_xattr_block_set(handle, inode, &i, &bs);
                        if (error)
                                goto cleanup;