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.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index 879e54d35c2d..d318c7e663fa 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -27,7 +27,6 @@
27#include <linux/mnt_namespace.h> 27#include <linux/mnt_namespace.h>
28#include <linux/mount.h> 28#include <linux/mount.h>
29#include <linux/namei.h> 29#include <linux/namei.h>
30#include <linux/quotaops.h>
31 30
32struct file_system_type reiserfs_fs_type; 31struct file_system_type reiserfs_fs_type;
33 32
@@ -2076,8 +2075,8 @@ static int reiserfs_quota_on(struct super_block *sb, int type, int format_id,
2076 return err; 2075 return err;
2077 /* Quotafile not on the same filesystem? */ 2076 /* Quotafile not on the same filesystem? */
2078 if (nd.path.mnt->mnt_sb != sb) { 2077 if (nd.path.mnt->mnt_sb != sb) {
2079 path_put(&nd.path); 2078 err = -EXDEV;
2080 return -EXDEV; 2079 goto out;
2081 } 2080 }
2082 inode = nd.path.dentry->d_inode; 2081 inode = nd.path.dentry->d_inode;
2083 /* We must not pack tails for quota files on reiserfs for quota IO to work */ 2082 /* We must not pack tails for quota files on reiserfs for quota IO to work */
@@ -2087,8 +2086,8 @@ static int reiserfs_quota_on(struct super_block *sb, int type, int format_id,
2087 reiserfs_warning(sb, 2086 reiserfs_warning(sb,
2088 "reiserfs: Unpacking tail of quota file failed" 2087 "reiserfs: Unpacking tail of quota file failed"
2089 " (%d). Cannot turn on quotas.", err); 2088 " (%d). Cannot turn on quotas.", err);
2090 path_put(&nd.path); 2089 err = -EINVAL;
2091 return -EINVAL; 2090 goto out;
2092 } 2091 }
2093 mark_inode_dirty(inode); 2092 mark_inode_dirty(inode);
2094 } 2093 }
@@ -2109,13 +2108,15 @@ static int reiserfs_quota_on(struct super_block *sb, int type, int format_id,
2109 /* Just start temporary transaction and finish it */ 2108 /* Just start temporary transaction and finish it */
2110 err = journal_begin(&th, sb, 1); 2109 err = journal_begin(&th, sb, 1);
2111 if (err) 2110 if (err)
2112 return err; 2111 goto out;
2113 err = journal_end_sync(&th, sb, 1); 2112 err = journal_end_sync(&th, sb, 1);
2114 if (err) 2113 if (err)
2115 return err; 2114 goto out;
2116 } 2115 }
2116 err = vfs_quota_on_path(sb, type, format_id, &nd.path);
2117out:
2117 path_put(&nd.path); 2118 path_put(&nd.path);
2118 return vfs_quota_on(sb, type, format_id, path, 0); 2119 return err;
2119} 2120}
2120 2121
2121/* Read data from quotafile - avoid pagecache and such because we cannot afford 2122/* Read data from quotafile - avoid pagecache and such because we cannot afford