]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/ext3/super.c
[ALSA] ice1712 - Fix missing replacement to snd_ctl_boolean_mono_info
[linux-2.6-omap-h63xx.git] / fs / ext3 / super.c
index 22cfdd61c060eb88dbb22a91695a61e6a9c8e540..9537316a0714eeca51f97c67442ccc36bfa2c539 100644 (file)
@@ -2578,8 +2578,11 @@ static int ext3_release_dquot(struct dquot *dquot)
 
        handle = ext3_journal_start(dquot_to_inode(dquot),
                                        EXT3_QUOTA_DEL_BLOCKS(dquot->dq_sb));
-       if (IS_ERR(handle))
+       if (IS_ERR(handle)) {
+               /* Release dquot anyway to avoid endless cycle in dqput() */
+               dquot_release(dquot);
                return PTR_ERR(handle);
+       }
        ret = dquot_release(dquot);
        err = ext3_journal_stop(handle);
        if (!ret)
@@ -2712,6 +2715,12 @@ static ssize_t ext3_quota_write(struct super_block *sb, int type,
        struct buffer_head *bh;
        handle_t *handle = journal_current_handle();
 
+       if (!handle) {
+               printk(KERN_WARNING "EXT3-fs: Quota write (off=%Lu, len=%Lu)"
+                       " cancelled because transaction is not started.\n",
+                       (unsigned long long)off, (unsigned long long)len);
+               return -EIO;
+       }
        mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA);
        while (towrite > 0) {
                tocopy = sb->s_blocksize - offset < towrite ?