LU-5912 libcfs: use vfs api for fsync calls
Use vfs_fsync_range() instead of direct use of filp->f_op->fsync()
routines. Doing so will apply correct locking transparently without
needing to decide how to do it ourselves.
What we were doing was a long term violation of the locking
protocols described in Documentation/filesystems/Locking in linux
source but was never noticed until new checking code went into the
RHEL 6.6 kernel. The new check triggered a visible error in syslog.
Lustre-commit:
a1f7493109cc995f43204d9a0f19a229ec5edef6
Lustre-change: http://review.whamcloud.com/12731
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I551215fc340637364fe04f6e3bae963cf983c953
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-on: http://review.whamcloud.com/13404
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>