diff options
author | Yan, Zheng <zyan@redhat.com> | 2018-01-08 01:36:25 -0500 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2018-01-29 12:36:11 -0500 |
commit | ee612d954fe96612afaa966d8a67b736ba0c571e (patch) | |
tree | 0fd9eae63c042c0162bde59d21e3405e0b461201 | |
parent | d84b37f9fa9b23a46af28d2e9430c87718b6b044 (diff) |
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>
-rw-r--r-- | fs/ceph/caps.c | 15 |
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: | |||
1793 | !tried_invalidate) { | 1793 | !tried_invalidate) { |
1794 | dout("check_caps trying to invalidate on %p\n", inode); | 1794 | dout("check_caps trying to invalidate on %p\n", inode); |
1795 | if (try_nonblocking_invalidate(inode) < 0) { | 1795 | if (try_nonblocking_invalidate(inode) < 0) { |
1796 | if (revoking & (CEPH_CAP_FILE_CACHE| | 1796 | dout("check_caps queuing invalidate\n"); |
1797 | CEPH_CAP_FILE_LAZYIO)) { | 1797 | queue_invalidate = true; |
1798 | dout("check_caps queuing invalidate\n"); | 1798 | ci->i_rdcache_revoking = ci->i_rdcache_gen; |
1799 | queue_invalidate = true; | ||
1800 | ci->i_rdcache_revoking = ci->i_rdcache_gen; | ||
1801 | } else { | ||
1802 | dout("check_caps failed to invalidate pages\n"); | ||
1803 | /* we failed to invalidate pages. check these | ||
1804 | caps again later. */ | ||
1805 | force_requeue = true; | ||
1806 | __cap_set_timeouts(mdsc, ci); | ||
1807 | } | ||
1808 | } | 1799 | } |
1809 | tried_invalidate = true; | 1800 | tried_invalidate = true; |
1810 | goto retry_locked; | 1801 | goto retry_locked; |