mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 13:38:01 +00:00
linux: fsync on a directory should return 0, not EINVAL
Directory writes are synchronous, so this is fine. There's a mostly-convenient function in fs/libfs.c that returns 0 that we can use to do what we want ("mostly" because it was renamed in 2.6.35). FIXES 130425 Reviewed-on: http://gerrit.openafs.org/6491 Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementix.org> (cherry picked from commit 267934d0e6910c8d8166a6e78f93c1bab40857b8) Change-Id: Iaeb8a699673b6144c186b470f6d877fb54f1e319 Reviewed-on: http://gerrit.openafs.org/6493 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
parent
31b0156bbf
commit
babc991c01
@ -896,6 +896,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
|
||||
AC_CHECK_LINUX_FUNC([zero_user_segments],
|
||||
[#include <linux/highmem.h>],
|
||||
[zero_user_segments(NULL, 0, 0, 0, 0);])
|
||||
AC_CHECK_LINUX_FUNC([noop_fsync],
|
||||
[#include <linux/fs.h>],
|
||||
[noop_fsync(NULL, 0, 0, 0);])
|
||||
|
||||
dnl Consequences - things which get set as a result of the
|
||||
dnl above tests
|
||||
|
@ -655,6 +655,11 @@ struct file_operations afs_dir_fops = {
|
||||
.open = afs_linux_open,
|
||||
.release = afs_linux_release,
|
||||
.llseek = default_llseek,
|
||||
#ifdef HAVE_LINUX_NOOP_FSYNC
|
||||
.fsync = noop_fsync,
|
||||
#else
|
||||
.fsync = simple_sync_file,
|
||||
#endif
|
||||
};
|
||||
|
||||
struct file_operations afs_file_fops = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user