summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2018-01-08 14:36:25 +0800
committerIlya Dryomov <idryomov@gmail.com>2018-01-29 18:36:11 +0100
commitee612d954fe96612afaa966d8a67b736ba0c571e (patch)
tree0fd9eae63c042c0162bde59d21e3405e0b461201 /fs
parentd84b37f9fa9b23a46af28d2e9430c87718b6b044 (diff)
downloadlinux-stable-ee612d954fe96612afaa966d8a67b736ba0c571e.tar.gz
linux-stable-ee612d954fe96612afaa966d8a67b736ba0c571e.tar.bz2
linux-stable-ee612d954fe96612afaa966d8a67b736ba0c571e.zip
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" <zyan@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/ceph/caps.c15
1 files changed, 3 insertions, 12 deletions
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;