diff options
Diffstat (limited to 'fs/ntfs')
-rw-r--r-- | fs/ntfs/dir.c | 2 | ||||
-rw-r--r-- | fs/ntfs/file.c | 2 | ||||
-rw-r--r-- | fs/ntfs/inode.c | 2 | ||||
-rw-r--r-- | fs/ntfs/inode.h | 4 | ||||
-rw-r--r-- | fs/ntfs/super.c | 8 |
5 files changed, 13 insertions, 5 deletions
diff --git a/fs/ntfs/dir.c b/fs/ntfs/dir.c index 5a9e34475e37..9173e82a45d1 100644 --- a/fs/ntfs/dir.c +++ b/fs/ntfs/dir.c | |||
@@ -1545,7 +1545,7 @@ static int ntfs_dir_fsync(struct file *filp, struct dentry *dentry, | |||
1545 | write_inode_now(bmp_vi, !datasync); | 1545 | write_inode_now(bmp_vi, !datasync); |
1546 | iput(bmp_vi); | 1546 | iput(bmp_vi); |
1547 | } | 1547 | } |
1548 | ret = ntfs_write_inode(vi, 1); | 1548 | ret = __ntfs_write_inode(vi, 1); |
1549 | write_inode_now(vi, !datasync); | 1549 | write_inode_now(vi, !datasync); |
1550 | err = sync_blockdev(vi->i_sb->s_bdev); | 1550 | err = sync_blockdev(vi->i_sb->s_bdev); |
1551 | if (unlikely(err && !ret)) | 1551 | if (unlikely(err && !ret)) |
diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c index 43179ddd336f..b681c71d7069 100644 --- a/fs/ntfs/file.c +++ b/fs/ntfs/file.c | |||
@@ -2182,7 +2182,7 @@ static int ntfs_file_fsync(struct file *filp, struct dentry *dentry, | |||
2182 | ntfs_debug("Entering for inode 0x%lx.", vi->i_ino); | 2182 | ntfs_debug("Entering for inode 0x%lx.", vi->i_ino); |
2183 | BUG_ON(S_ISDIR(vi->i_mode)); | 2183 | BUG_ON(S_ISDIR(vi->i_mode)); |
2184 | if (!datasync || !NInoNonResident(NTFS_I(vi))) | 2184 | if (!datasync || !NInoNonResident(NTFS_I(vi))) |
2185 | ret = ntfs_write_inode(vi, 1); | 2185 | ret = __ntfs_write_inode(vi, 1); |
2186 | write_inode_now(vi, !datasync); | 2186 | write_inode_now(vi, !datasync); |
2187 | /* | 2187 | /* |
2188 | * NOTE: If we were to use mapping->private_list (see ext2 and | 2188 | * NOTE: If we were to use mapping->private_list (see ext2 and |
diff --git a/fs/ntfs/inode.c b/fs/ntfs/inode.c index dc2505abb6d7..4b57fb1eac2a 100644 --- a/fs/ntfs/inode.c +++ b/fs/ntfs/inode.c | |||
@@ -2957,7 +2957,7 @@ out: | |||
2957 | * | 2957 | * |
2958 | * Return 0 on success and -errno on error. | 2958 | * Return 0 on success and -errno on error. |
2959 | */ | 2959 | */ |
2960 | int ntfs_write_inode(struct inode *vi, int sync) | 2960 | int __ntfs_write_inode(struct inode *vi, int sync) |
2961 | { | 2961 | { |
2962 | sle64 nt; | 2962 | sle64 nt; |
2963 | ntfs_inode *ni = NTFS_I(vi); | 2963 | ntfs_inode *ni = NTFS_I(vi); |
diff --git a/fs/ntfs/inode.h b/fs/ntfs/inode.h index 117eaf8032a3..9a113544605d 100644 --- a/fs/ntfs/inode.h +++ b/fs/ntfs/inode.h | |||
@@ -307,12 +307,12 @@ extern void ntfs_truncate_vfs(struct inode *vi); | |||
307 | 307 | ||
308 | extern int ntfs_setattr(struct dentry *dentry, struct iattr *attr); | 308 | extern int ntfs_setattr(struct dentry *dentry, struct iattr *attr); |
309 | 309 | ||
310 | extern int ntfs_write_inode(struct inode *vi, int sync); | 310 | extern int __ntfs_write_inode(struct inode *vi, int sync); |
311 | 311 | ||
312 | static inline void ntfs_commit_inode(struct inode *vi) | 312 | static inline void ntfs_commit_inode(struct inode *vi) |
313 | { | 313 | { |
314 | if (!is_bad_inode(vi)) | 314 | if (!is_bad_inode(vi)) |
315 | ntfs_write_inode(vi, 1); | 315 | __ntfs_write_inode(vi, 1); |
316 | return; | 316 | return; |
317 | } | 317 | } |
318 | 318 | ||
diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c index 80b04770e8e9..1cf39dfaee7a 100644 --- a/fs/ntfs/super.c +++ b/fs/ntfs/super.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include "dir.h" | 39 | #include "dir.h" |
40 | #include "debug.h" | 40 | #include "debug.h" |
41 | #include "index.h" | 41 | #include "index.h" |
42 | #include "inode.h" | ||
42 | #include "aops.h" | 43 | #include "aops.h" |
43 | #include "layout.h" | 44 | #include "layout.h" |
44 | #include "malloc.h" | 45 | #include "malloc.h" |
@@ -2662,6 +2663,13 @@ static int ntfs_statfs(struct dentry *dentry, struct kstatfs *sfs) | |||
2662 | return 0; | 2663 | return 0; |
2663 | } | 2664 | } |
2664 | 2665 | ||
2666 | #ifdef NTFS_RW | ||
2667 | static int ntfs_write_inode(struct inode *vi, struct writeback_control *wbc) | ||
2668 | { | ||
2669 | return __ntfs_write_inode(vi, wbc->sync_mode == WB_SYNC_ALL); | ||
2670 | } | ||
2671 | #endif | ||
2672 | |||
2665 | /** | 2673 | /** |
2666 | * The complete super operations. | 2674 | * The complete super operations. |
2667 | */ | 2675 | */ |