]> git.baikalelectronics.ru Git - kernel.git/commit
afs: Set correct lock type for the yfs CreateFile
authorMarc Dionne <marc.dionne@auristor.com>
Wed, 9 Jan 2019 17:23:54 +0000 (17:23 +0000)
committerDavid Howells <dhowells@redhat.com>
Thu, 10 Jan 2019 17:12:05 +0000 (17:12 +0000)
commitd99474de06a5d276cadd1cea99dd7610106b6e90
tree55d66da44f623af39dcb5a12c3de1c5f398c5126
parent7adda90e0cdafca8c693dd484251e5daee5599f3
afs: Set correct lock type for the yfs CreateFile

A lock type of 0 is "LockRead", which makes the fileserver record an
unintentional read lock on the new file.  This will cause problems
later on if the file is the subject of locking operations.

The correct default value should be -1 ("LockNone").

Fix the operation marshalling code to set the value and provide an enum to
symbolise the values whilst we're at it.

Fixes: 22184ef65c2d ("afs: Implement YFS support in the fs client")
Signed-off-by: Marc Dionne <marc.dionne@auristor.com>
Signed-off-by: David Howells <dhowells@redhat.com>
fs/afs/protocol_yfs.h
fs/afs/yfsclient.c