]> git.baikalelectronics.ru Git - kernel.git/commit
locks: factor out generic/filesystem switch from test_lock
authorJ. Bruce Fields <bfields@citi.umich.edu>
Wed, 21 Feb 2007 05:58:50 +0000 (00:58 -0500)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Sun, 6 May 2007 22:06:44 +0000 (18:06 -0400)
commit477e21211b5a5f56c36b869a9fe9dff7d9060fb0
tree6f49a9893dc656fac4d5a334946ccbf4e911891f
parent6e801d3cdb7bb535893f3d0b8aa581602bab3100
locks: factor out generic/filesystem switch from test_lock

Factor out the code that switches between generic and filesystem-specific lock
methods; eventually we want to call this from lock managers (lockd and nfsd)
too; currently they only call the generic methods.

This patch does that for test_lock.

Note that this hasn't been necessary until recently, because the few
filesystems that define ->lock() (nfs, cifs...) aren't exportable via NFS.
However GFS (and, in the future, other cluster filesystems) need to implement
their own locking to get cluster-coherent locking, and also want to be able to
export locking to NFS (lockd and NFSv4).

So we accomplish this by factoring out code such as this and exporting it for
the use of lockd and nfsd.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
fs/locks.c
include/linux/fs.h