From 5bc1fe092cba04d0e067214e7c2b0b756ba29843 Mon Sep 17 00:00:00 2001 From: Patrick Farrell Date: Mon, 3 Feb 2020 22:10:23 -0500 Subject: [PATCH] LU-13196 llite: Remove mutex on dio read DIO reads in Lustre are protected by Lustre range locking and do not need the inode mutex. This code was removed in LU-1669, the range lock was added for DIO reads in LU-6227, and then the mutex was accidentally re-introduced in LU-6260. Remove it again. Test-Parameters: envdefinitions=ONLY=16 testlist=sanityn,sanityn,sanityn,sanityn,sanityn,sanityn,sanityn,sanityn Fixes: 98883bd3e2cc ("LU-6260 llite: add support for direct IO api changes") Signed-off-by: Patrick Farrell Change-Id: I5b3570e83a4b4ff36d9a22bc6bd3be5d5f991924 Reviewed-on: https://review.whamcloud.com/37419 Reviewed-by: Wang Shilong Tested-by: jenkins Reviewed-by: Neil Brown Tested-by: Shuichi Ihara Reviewed-by: James Simmons Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/llite/rw26.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/lustre/llite/rw26.c b/lustre/llite/rw26.c index 815ab13..8fd227e 100644 --- a/lustre/llite/rw26.c +++ b/lustre/llite/rw26.c @@ -436,13 +436,6 @@ ll_direct_IO_impl(struct kiocb *iocb, struct iov_iter *iter, int rw) LASSERT(aio); LASSERT(aio->cda_iocb == iocb); - /* 0. Need locking between buffered and direct access. and race with - * size changing by concurrent truncates and writes. - * 1. Need inode mutex to operate transient pages. - */ - if (rw == READ) - inode_lock(inode); - while (iov_iter_count(iter)) { struct ll_dio_pages pvec = { .ldp_aio = aio }; struct page **pages; @@ -513,9 +506,6 @@ out: result = -EIOCBQUEUED; } - if (rw == READ) - inode_unlock(inode); - return result; } -- 1.8.3.1