Linux 4.5: don't access i_mutex directly 68/12268/5
authorBenjamin Kaduk <kaduk@mit.edu>
Sun, 1 May 2016 23:48:40 +0000 (19:48 -0400)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 10 Jun 2016 20:21:42 +0000 (16:21 -0400)
commit360f4ef53c454494cd5212a5ea46c658bdb2879c
treebe1cd71911802c3afba56e29e08bb629599b103b
parent2ef27ea1bb032cee8d26980e60e02b52a0805763
Linux 4.5: don't access i_mutex directly

Linux commit 5955102c, in preparation for future work, introduced
wrapper functions to lock/unlock inode mutexes.  This is to
prepare for converting it to a read-write semaphore, so that
lookup can be done with only the shared lock held.

Adopt the afs_linux_*lock_inode() functions accordingly, and
convert afs_linux_fsync() to using those wrappers, since the
FOP_FSYNC_TAKES_RANGE case appears to be the current case.

Amusingly, afs_linux_*lock_inode() already have a branch to
handle the case when inode serialization is protected by a
semaphore; it seems that this is going to come full-circle.

Change-Id: Ia5a194acc559de21808655ef066151a0a3826364
Reviewed-on: https://gerrit.openafs.org/12268
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Joe Gorse <jhgorse@gmail.com>
Tested-by: Joe Gorse <jhgorse@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
acinclude.m4
src/afs/LINUX/osi_compat.h
src/afs/LINUX/osi_vnodeops.c