From: Yan, Zheng Date: Mon, 8 Jan 2018 06:36:25 +0000 (+0800) Subject: ceph: delete unreachable code in ceph_check_caps() X-Git-Tag: v4.16-rc1~32^2~4 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=ee612d954fe96612afaa966d8a67b736ba0c571e;p=linux-block.git ceph: delete unreachable code in ceph_check_caps() "revoking & (CEPH_CAP_FILE_CACHE|CEPH_CAP_FILE_LAZYIO)" has already been tested before calling try_nonblocking_invalidate() Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov --- diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index f28efaecbb50..36f8a4bdf8c5 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -1793,18 +1793,9 @@ retry_locked: !tried_invalidate) { dout("check_caps trying to invalidate on %p\n", inode); if (try_nonblocking_invalidate(inode) < 0) { - if (revoking & (CEPH_CAP_FILE_CACHE| - CEPH_CAP_FILE_LAZYIO)) { - dout("check_caps queuing invalidate\n"); - queue_invalidate = true; - ci->i_rdcache_revoking = ci->i_rdcache_gen; - } else { - dout("check_caps failed to invalidate pages\n"); - /* we failed to invalidate pages. check these - caps again later. */ - force_requeue = true; - __cap_set_timeouts(mdsc, ci); - } + dout("check_caps queuing invalidate\n"); + queue_invalidate = true; + ci->i_rdcache_revoking = ci->i_rdcache_gen; } tried_invalidate = true; goto retry_locked;