flock: make flock(1) work on NFSv4
To pleace an exclusive lock on a file, NFSv4 requires the file to be opened RW because of the emulation of flock() by fcntl(): http://www.spinics.net/lists/linux-nfs/msg18502.html So instead of O_RDONLY, open the file in O_RDWR if access() indicates it is possible (unless shared lock is requested). From: Michal Kubecek <mkubecek@suse.cz> Signed-off-by:Petr Uzel <petr.uzel@suse.cz>
Showing
Please register or sign in to comment