Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
0eb8af49
Commit
0eb8af49
authored
Feb 20, 2017
by
Miklos Szeredi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vfs: use helper for calling f_op->fsync()
Signed-off-by:
Miklos Szeredi
<
mszeredi@redhat.com
>
parent
f74ac015
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
fs/sync.c
fs/sync.c
+1
-1
include/linux/fs.h
include/linux/fs.h
+6
-0
ipc/shm.c
ipc/shm.c
+1
-1
No files found.
fs/sync.c
View file @
0eb8af49
...
...
@@ -192,7 +192,7 @@ int vfs_fsync_range(struct file *file, loff_t start, loff_t end, int datasync)
spin_unlock
(
&
inode
->
i_lock
);
mark_inode_dirty_sync
(
inode
);
}
return
file
->
f_op
->
fsync
(
file
,
start
,
end
,
datasync
);
return
call_
fsync
(
file
,
start
,
end
,
datasync
);
}
EXPORT_SYMBOL
(
vfs_fsync_range
);
...
...
include/linux/fs.h
View file @
0eb8af49
...
...
@@ -1732,6 +1732,12 @@ static inline int call_mmap(struct file *file, struct vm_area_struct *vma)
return
file
->
f_op
->
mmap
(
file
,
vma
);
}
static
inline
int
call_fsync
(
struct
file
*
file
,
loff_t
start
,
loff_t
end
,
int
datasync
)
{
return
file
->
f_op
->
fsync
(
file
,
start
,
end
,
datasync
);
}
ssize_t
rw_copy_check_uvector
(
int
type
,
const
struct
iovec
__user
*
uvector
,
unsigned
long
nr_segs
,
unsigned
long
fast_segs
,
struct
iovec
*
fast_pointer
,
...
...
ipc/shm.c
View file @
0eb8af49
...
...
@@ -452,7 +452,7 @@ static int shm_fsync(struct file *file, loff_t start, loff_t end, int datasync)
if
(
!
sfd
->
file
->
f_op
->
fsync
)
return
-
EINVAL
;
return
sfd
->
file
->
f_op
->
fsync
(
sfd
->
file
,
start
,
end
,
datasync
);
return
call_
fsync
(
sfd
->
file
,
start
,
end
,
datasync
);
}
static
long
shm_fallocate
(
struct
file
*
file
,
int
mode
,
loff_t
offset
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment