diff options
Diffstat (limited to 'fs/ufs/inode.c')
-rw-r--r-- | fs/ufs/inode.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c index 7cf33379fd46..80b68c3702d1 100644 --- a/fs/ufs/inode.c +++ b/fs/ufs/inode.c | |||
@@ -36,6 +36,8 @@ | |||
36 | #include <linux/mm.h> | 36 | #include <linux/mm.h> |
37 | #include <linux/smp_lock.h> | 37 | #include <linux/smp_lock.h> |
38 | #include <linux/buffer_head.h> | 38 | #include <linux/buffer_head.h> |
39 | #include <linux/writeback.h> | ||
40 | #include <linux/quotaops.h> | ||
39 | 41 | ||
40 | #include "ufs_fs.h" | 42 | #include "ufs_fs.h" |
41 | #include "ufs.h" | 43 | #include "ufs.h" |
@@ -890,11 +892,11 @@ static int ufs_update_inode(struct inode * inode, int do_sync) | |||
890 | return 0; | 892 | return 0; |
891 | } | 893 | } |
892 | 894 | ||
893 | int ufs_write_inode (struct inode * inode, int wait) | 895 | int ufs_write_inode(struct inode *inode, struct writeback_control *wbc) |
894 | { | 896 | { |
895 | int ret; | 897 | int ret; |
896 | lock_kernel(); | 898 | lock_kernel(); |
897 | ret = ufs_update_inode (inode, wait); | 899 | ret = ufs_update_inode(inode, wbc->sync_mode == WB_SYNC_ALL); |
898 | unlock_kernel(); | 900 | unlock_kernel(); |
899 | return ret; | 901 | return ret; |
900 | } | 902 | } |
@@ -908,6 +910,9 @@ void ufs_delete_inode (struct inode * inode) | |||
908 | { | 910 | { |
909 | loff_t old_i_size; | 911 | loff_t old_i_size; |
910 | 912 | ||
913 | if (!is_bad_inode(inode)) | ||
914 | dquot_initialize(inode); | ||
915 | |||
911 | truncate_inode_pages(&inode->i_data, 0); | 916 | truncate_inode_pages(&inode->i_data, 0); |
912 | if (is_bad_inode(inode)) | 917 | if (is_bad_inode(inode)) |
913 | goto no_delete; | 918 | goto no_delete; |