]> git.proxmox.com Git - mirror_spl.git/commit
Linux 4.7 compat: inode_lock() and friends
authorChunwei Chen <david.chen@osnexus.com>
Wed, 18 May 2016 18:28:46 +0000 (11:28 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 20 May 2016 18:00:14 +0000 (11:00 -0700)
commitfdbc1ba99d1f4d3958189079eee9b6c957e0264b
treededfad932799dcfed78070207d66e8d231d0854f
parent39cd90ef08bb6817dd57ac08e9de5c87af2681ed
Linux 4.7 compat: inode_lock() and friends

Linux 4.7 changes i_mutex to i_rwsem, and we should used inode_lock and
inode_lock_shared to do exclusive and shared lock respectively.

We use spl_inode_lock{,_shared}() to hide the difference. Note that on older
kernel you'll always take an exclusive lock.

We also add all other inode_lock friends. And nested users now should
explicitly call spl_inode_lock_nested with correct subclass.

Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue zfsonlinux/zfs#4665
Closes #549
config/spl-build.m4
include/linux/file_compat.h
module/spl/spl-vnode.c