aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/reiserfs/super.c')
-rw-r--r--fs/reiserfs/super.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index 5b68dd3f191a..a005451930b7 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -1915,8 +1915,11 @@ static int reiserfs_release_dquot(struct dquot *dquot)
1915 ret = 1915 ret =
1916 journal_begin(&th, dquot->dq_sb, 1916 journal_begin(&th, dquot->dq_sb,
1917 REISERFS_QUOTA_DEL_BLOCKS(dquot->dq_sb)); 1917 REISERFS_QUOTA_DEL_BLOCKS(dquot->dq_sb));
1918 if (ret) 1918 if (ret) {
1919 /* Release dquot anyway to avoid endless cycle in dqput() */
1920 dquot_release(dquot);
1919 goto out; 1921 goto out;
1922 }
1920 ret = dquot_release(dquot); 1923 ret = dquot_release(dquot);
1921 err = 1924 err =
1922 journal_end(&th, dquot->dq_sb, 1925 journal_end(&th, dquot->dq_sb,
@@ -2067,6 +2070,12 @@ static ssize_t reiserfs_quota_write(struct super_block *sb, int type,
2067 size_t towrite = len; 2070 size_t towrite = len;
2068 struct buffer_head tmp_bh, *bh; 2071 struct buffer_head tmp_bh, *bh;
2069 2072
2073 if (!current->journal_info) {
2074 printk(KERN_WARNING "reiserfs: Quota write (off=%Lu, len=%Lu)"
2075 " cancelled because transaction is not started.\n",
2076 (unsigned long long)off, (unsigned long long)len);
2077 return -EIO;
2078 }
2070 mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA); 2079 mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA);
2071 while (towrite > 0) { 2080 while (towrite > 0) {
2072 tocopy = sb->s_blocksize - offset < towrite ? 2081 tocopy = sb->s_blocksize - offset < towrite ?
@@ -2098,7 +2107,7 @@ static ssize_t reiserfs_quota_write(struct super_block *sb, int type,
2098 data += tocopy; 2107 data += tocopy;
2099 blk++; 2108 blk++;
2100 } 2109 }
2101 out: 2110out:
2102 if (len == towrite) 2111 if (len == towrite)
2103 return err; 2112 return err;
2104 if (inode->i_size < off + len - towrite) 2113 if (inode->i_size < off + len - towrite)