diff options
-rw-r--r-- | fs/udf/Makefile | 2 | ||||
-rw-r--r-- | fs/udf/dir.c | 2 | ||||
-rw-r--r-- | fs/udf/file.c | 2 | ||||
-rw-r--r-- | fs/udf/fsync.c | 52 | ||||
-rw-r--r-- | fs/udf/udfdecl.h | 3 |
5 files changed, 3 insertions, 58 deletions
diff --git a/fs/udf/Makefile b/fs/udf/Makefile index 0d4503f7446d..eb880f66c23a 100644 --- a/fs/udf/Makefile +++ b/fs/udf/Makefile | |||
@@ -5,5 +5,5 @@ | |||
5 | obj-$(CONFIG_UDF_FS) += udf.o | 5 | obj-$(CONFIG_UDF_FS) += udf.o |
6 | 6 | ||
7 | udf-objs := balloc.o dir.o file.o ialloc.o inode.o lowlevel.o namei.o \ | 7 | udf-objs := balloc.o dir.o file.o ialloc.o inode.o lowlevel.o namei.o \ |
8 | partition.o super.o truncate.o symlink.o fsync.o \ | 8 | partition.o super.o truncate.o symlink.o \ |
9 | directory.o misc.o udftime.o unicode.o | 9 | directory.o misc.o udftime.o unicode.o |
diff --git a/fs/udf/dir.c b/fs/udf/dir.c index 2efd4d5291b6..61d9a76a3a69 100644 --- a/fs/udf/dir.c +++ b/fs/udf/dir.c | |||
@@ -210,5 +210,5 @@ const struct file_operations udf_dir_operations = { | |||
210 | .read = generic_read_dir, | 210 | .read = generic_read_dir, |
211 | .readdir = udf_readdir, | 211 | .readdir = udf_readdir, |
212 | .ioctl = udf_ioctl, | 212 | .ioctl = udf_ioctl, |
213 | .fsync = udf_fsync_file, | 213 | .fsync = simple_fsync, |
214 | }; | 214 | }; |
diff --git a/fs/udf/file.c b/fs/udf/file.c index eb91f3b70320..7464305382b5 100644 --- a/fs/udf/file.c +++ b/fs/udf/file.c | |||
@@ -209,7 +209,7 @@ const struct file_operations udf_file_operations = { | |||
209 | .write = do_sync_write, | 209 | .write = do_sync_write, |
210 | .aio_write = udf_file_aio_write, | 210 | .aio_write = udf_file_aio_write, |
211 | .release = udf_release_file, | 211 | .release = udf_release_file, |
212 | .fsync = udf_fsync_file, | 212 | .fsync = simple_fsync, |
213 | .splice_read = generic_file_splice_read, | 213 | .splice_read = generic_file_splice_read, |
214 | .llseek = generic_file_llseek, | 214 | .llseek = generic_file_llseek, |
215 | }; | 215 | }; |
diff --git a/fs/udf/fsync.c b/fs/udf/fsync.c deleted file mode 100644 index b2c472b733b8..000000000000 --- a/fs/udf/fsync.c +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | /* | ||
2 | * fsync.c | ||
3 | * | ||
4 | * PURPOSE | ||
5 | * Fsync handling routines for the OSTA-UDF(tm) filesystem. | ||
6 | * | ||
7 | * COPYRIGHT | ||
8 | * This file is distributed under the terms of the GNU General Public | ||
9 | * License (GPL). Copies of the GPL can be obtained from: | ||
10 | * ftp://prep.ai.mit.edu/pub/gnu/GPL | ||
11 | * Each contributing author retains all rights to their own work. | ||
12 | * | ||
13 | * (C) 1999-2001 Ben Fennema | ||
14 | * (C) 1999-2000 Stelias Computing Inc | ||
15 | * | ||
16 | * HISTORY | ||
17 | * | ||
18 | * 05/22/99 blf Created. | ||
19 | */ | ||
20 | |||
21 | #include "udfdecl.h" | ||
22 | |||
23 | #include <linux/fs.h> | ||
24 | |||
25 | static int udf_fsync_inode(struct inode *, int); | ||
26 | |||
27 | /* | ||
28 | * File may be NULL when we are called. Perhaps we shouldn't | ||
29 | * even pass file to fsync ? | ||
30 | */ | ||
31 | |||
32 | int udf_fsync_file(struct file *file, struct dentry *dentry, int datasync) | ||
33 | { | ||
34 | struct inode *inode = dentry->d_inode; | ||
35 | |||
36 | return udf_fsync_inode(inode, datasync); | ||
37 | } | ||
38 | |||
39 | static int udf_fsync_inode(struct inode *inode, int datasync) | ||
40 | { | ||
41 | int err; | ||
42 | |||
43 | err = sync_mapping_buffers(inode->i_mapping); | ||
44 | if (!(inode->i_state & I_DIRTY)) | ||
45 | return err; | ||
46 | if (datasync && !(inode->i_state & I_DIRTY_DATASYNC)) | ||
47 | return err; | ||
48 | |||
49 | err |= udf_sync_inode(inode); | ||
50 | |||
51 | return err ? -EIO : 0; | ||
52 | } | ||
diff --git a/fs/udf/udfdecl.h b/fs/udf/udfdecl.h index cac51b77a5d1..8d46f4294ee7 100644 --- a/fs/udf/udfdecl.h +++ b/fs/udf/udfdecl.h | |||
@@ -223,9 +223,6 @@ extern int udf_prealloc_blocks(struct super_block *, struct inode *, uint16_t, | |||
223 | extern int udf_new_block(struct super_block *, struct inode *, uint16_t, | 223 | extern int udf_new_block(struct super_block *, struct inode *, uint16_t, |
224 | uint32_t, int *); | 224 | uint32_t, int *); |
225 | 225 | ||
226 | /* fsync.c */ | ||
227 | extern int udf_fsync_file(struct file *, struct dentry *, int); | ||
228 | |||
229 | /* directory.c */ | 226 | /* directory.c */ |
230 | extern struct fileIdentDesc *udf_fileident_read(struct inode *, loff_t *, | 227 | extern struct fileIdentDesc *udf_fileident_read(struct inode *, loff_t *, |
231 | struct udf_fileident_bh *, | 228 | struct udf_fileident_bh *, |