smbd:close: only remove kernel share modes if they had been taken at open
authorMichael Adam <obnox@samba.org>
Sun, 15 May 2016 21:24:08 +0000 (23:24 +0200)
committerChristian Ambach <ambi@samba.org>
Thu, 19 May 2016 00:34:36 +0000 (02:34 +0200)
commit6b232b2720a3d71bc0b4b5603215b3f9d3de5ca6
tree531dd9c9df29f237af77fd3e1ad2f0f189f997c3
parent356487345724ce5dffdddf9c60735b2c965f30bc
smbd:close: only remove kernel share modes if they had been taken at open

This avoids errors due to 'not implemented' for SMB_VFS_KERNEL_FLOCK
on some file systems like glusterfs (with the vfs module). The only
other code path where SMB_VFS_KERNEL_FLOCK is called, is already protected.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11919

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Thu May 19 02:34:36 CEST 2016 on sn-devel-144
source3/smbd/close.c
source3/smbd/open.c