diff options
Diffstat (limited to 'fs/jfs')
-rw-r--r-- | fs/jfs/file.c | 4 | ||||
-rw-r--r-- | fs/jfs/jfs_inode.h | 2 | ||||
-rw-r--r-- | fs/jfs/super.c | 16 |
3 files changed, 19 insertions, 3 deletions
diff --git a/fs/jfs/file.c b/fs/jfs/file.c index 85d9ec659225..127263cc8657 100644 --- a/fs/jfs/file.c +++ b/fs/jfs/file.c | |||
@@ -27,9 +27,9 @@ | |||
27 | #include "jfs_acl.h" | 27 | #include "jfs_acl.h" |
28 | #include "jfs_debug.h" | 28 | #include "jfs_debug.h" |
29 | 29 | ||
30 | int jfs_fsync(struct file *file, struct dentry *dentry, int datasync) | 30 | int jfs_fsync(struct file *file, int datasync) |
31 | { | 31 | { |
32 | struct inode *inode = dentry->d_inode; | 32 | struct inode *inode = file->f_mapping->host; |
33 | int rc = 0; | 33 | int rc = 0; |
34 | 34 | ||
35 | if (!(inode->i_state & I_DIRTY) || | 35 | if (!(inode->i_state & I_DIRTY) || |
diff --git a/fs/jfs/jfs_inode.h b/fs/jfs/jfs_inode.h index 9e6bda30a6e8..11042b1f44b5 100644 --- a/fs/jfs/jfs_inode.h +++ b/fs/jfs/jfs_inode.h | |||
@@ -21,7 +21,7 @@ | |||
21 | struct fid; | 21 | struct fid; |
22 | 22 | ||
23 | extern struct inode *ialloc(struct inode *, umode_t); | 23 | extern struct inode *ialloc(struct inode *, umode_t); |
24 | extern int jfs_fsync(struct file *, struct dentry *, int); | 24 | extern int jfs_fsync(struct file *, int); |
25 | extern long jfs_ioctl(struct file *, unsigned int, unsigned long); | 25 | extern long jfs_ioctl(struct file *, unsigned int, unsigned long); |
26 | extern long jfs_compat_ioctl(struct file *, unsigned int, unsigned long); | 26 | extern long jfs_compat_ioctl(struct file *, unsigned int, unsigned long); |
27 | extern struct inode *jfs_iget(struct super_block *, unsigned long); | 27 | extern struct inode *jfs_iget(struct super_block *, unsigned long); |
diff --git a/fs/jfs/super.c b/fs/jfs/super.c index b66832ac33ac..b38f96bef829 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c | |||
@@ -179,6 +179,8 @@ static void jfs_put_super(struct super_block *sb) | |||
179 | 179 | ||
180 | jfs_info("In jfs_put_super"); | 180 | jfs_info("In jfs_put_super"); |
181 | 181 | ||
182 | dquot_disable(sb, -1, DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED); | ||
183 | |||
182 | lock_kernel(); | 184 | lock_kernel(); |
183 | 185 | ||
184 | rc = jfs_umount(sb); | 186 | rc = jfs_umount(sb); |
@@ -396,10 +398,20 @@ static int jfs_remount(struct super_block *sb, int *flags, char *data) | |||
396 | 398 | ||
397 | JFS_SBI(sb)->flag = flag; | 399 | JFS_SBI(sb)->flag = flag; |
398 | ret = jfs_mount_rw(sb, 1); | 400 | ret = jfs_mount_rw(sb, 1); |
401 | |||
402 | /* mark the fs r/w for quota activity */ | ||
403 | sb->s_flags &= ~MS_RDONLY; | ||
404 | |||
399 | unlock_kernel(); | 405 | unlock_kernel(); |
406 | dquot_resume(sb, -1); | ||
400 | return ret; | 407 | return ret; |
401 | } | 408 | } |
402 | if ((!(sb->s_flags & MS_RDONLY)) && (*flags & MS_RDONLY)) { | 409 | if ((!(sb->s_flags & MS_RDONLY)) && (*flags & MS_RDONLY)) { |
410 | rc = dquot_suspend(sb, -1); | ||
411 | if (rc < 0) { | ||
412 | unlock_kernel(); | ||
413 | return rc; | ||
414 | } | ||
403 | rc = jfs_umount_rw(sb); | 415 | rc = jfs_umount_rw(sb); |
404 | JFS_SBI(sb)->flag = flag; | 416 | JFS_SBI(sb)->flag = flag; |
405 | unlock_kernel(); | 417 | unlock_kernel(); |
@@ -469,6 +481,10 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent) | |||
469 | */ | 481 | */ |
470 | sb->s_op = &jfs_super_operations; | 482 | sb->s_op = &jfs_super_operations; |
471 | sb->s_export_op = &jfs_export_operations; | 483 | sb->s_export_op = &jfs_export_operations; |
484 | #ifdef CONFIG_QUOTA | ||
485 | sb->dq_op = &dquot_operations; | ||
486 | sb->s_qcop = &dquot_quotactl_ops; | ||
487 | #endif | ||
472 | 488 | ||
473 | /* | 489 | /* |
474 | * Initialize direct-mapping inode/address-space | 490 | * Initialize direct-mapping inode/address-space |