Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b4f840c1 authored by Li Dongyang's avatar Li Dongyang Committed by Greg Kroah-Hartman
Browse files

staging: lustre: mdt: fail FMODE_WRITE open if the client is read only



O_WRONLY/O_RDWR open on a file will get EROFS on a read only client,
but the rpc gets sent to the mdt anyway.
mdt will increase the mot_write_count of the mdt object, blocking
subsequent FMODE_EXEC open to the same file.

This patch makes sure we fail the FMODE_WRITE open with EROFS on the
client straight away without sending the rpc to mdt.

Signed-off-by: default avatarLi Dongyang <dongyang.li@anu.edu.au>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7727
Reviewed-on: http://review.whamcloud.com/18242


Reviewed-by: default avatarIan Costello <icostello@ddn.com>
Reviewed-by: default avatarNathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: default avatarYang Sheng <yang.sheng@intel.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2ba88d4e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment