[PATCH 11/22] staging: lustre: mdt: fail FMODE_WRITE open if the client is read only

2016-12-02 Thread James Simmons
From: Li Dongyang 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

[PATCH 11/22] staging: lustre: mdt: fail FMODE_WRITE open if the client is read only

2016-12-02 Thread James Simmons
From: Li Dongyang 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