aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jfs/inode.c')
-rw-r--r--fs/jfs/inode.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c
index b2ae190a77ba..ed9ba6fe04f5 100644
--- a/fs/jfs/inode.c
+++ b/fs/jfs/inode.c
@@ -22,6 +22,7 @@
22#include <linux/buffer_head.h> 22#include <linux/buffer_head.h>
23#include <linux/pagemap.h> 23#include <linux/pagemap.h>
24#include <linux/quotaops.h> 24#include <linux/quotaops.h>
25#include <linux/writeback.h>
25#include "jfs_incore.h" 26#include "jfs_incore.h"
26#include "jfs_inode.h" 27#include "jfs_inode.h"
27#include "jfs_filsys.h" 28#include "jfs_filsys.h"
@@ -60,7 +61,7 @@ struct inode *jfs_iget(struct super_block *sb, unsigned long ino)
60 inode->i_op = &page_symlink_inode_operations; 61 inode->i_op = &page_symlink_inode_operations;
61 inode->i_mapping->a_ops = &jfs_aops; 62 inode->i_mapping->a_ops = &jfs_aops;
62 } else { 63 } else {
63 inode->i_op = &jfs_symlink_inode_operations; 64 inode->i_op = &jfs_fast_symlink_inode_operations;
64 /* 65 /*
65 * The inline data should be null-terminated, but 66 * The inline data should be null-terminated, but
66 * don't let on-disk corruption crash the kernel 67 * don't let on-disk corruption crash the kernel
@@ -120,8 +121,10 @@ int jfs_commit_inode(struct inode *inode, int wait)
120 return rc; 121 return rc;
121} 122}
122 123
123int jfs_write_inode(struct inode *inode, int wait) 124int jfs_write_inode(struct inode *inode, struct writeback_control *wbc)
124{ 125{
126 int wait = wbc->sync_mode == WB_SYNC_ALL;
127
125 if (test_cflag(COMMIT_Nolink, inode)) 128 if (test_cflag(COMMIT_Nolink, inode))
126 return 0; 129 return 0;
127 /* 130 /*
@@ -146,6 +149,9 @@ void jfs_delete_inode(struct inode *inode)
146{ 149{
147 jfs_info("In jfs_delete_inode, inode = 0x%p", inode); 150 jfs_info("In jfs_delete_inode, inode = 0x%p", inode);
148 151
152 if (!is_bad_inode(inode))
153 dquot_initialize(inode);
154
149 if (!is_bad_inode(inode) && 155 if (!is_bad_inode(inode) &&
150 (JFS_IP(inode)->fileset == FILESYSTEM_I)) { 156 (JFS_IP(inode)->fileset == FILESYSTEM_I)) {
151 truncate_inode_pages(&inode->i_data, 0); 157 truncate_inode_pages(&inode->i_data, 0);
@@ -158,9 +164,9 @@ void jfs_delete_inode(struct inode *inode)
158 /* 164 /*
159 * Free the inode from the quota allocation. 165 * Free the inode from the quota allocation.
160 */ 166 */
161 vfs_dq_init(inode); 167 dquot_initialize(inode);
162 vfs_dq_free_inode(inode); 168 dquot_free_inode(inode);
163 vfs_dq_drop(inode); 169 dquot_drop(inode);
164 } 170 }
165 171
166 clear_inode(inode); 172 clear_inode(inode);