Skip to content

Commit 7d8976a

Browse files
Wu Boidryomov
authored andcommitted
ceph: fix special error code in ceph_try_get_caps()
There are 3 speical error codes: -EAGAIN/-EFBIG/-ESTALE. After calling try_get_cap_refs, ceph_try_get_caps test for the -EAGAIN twice. Ensure that it tests for -ESTALE instead. Signed-off-by: Wu Bo <[email protected]> Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
1 parent 0fa8263 commit 7d8976a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/ceph/caps.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2749,7 +2749,7 @@ int ceph_try_get_caps(struct inode *inode, int need, int want,
27492749

27502750
ret = try_get_cap_refs(inode, need, want, 0, flags, got);
27512751
/* three special error codes */
2752-
if (ret == -EAGAIN || ret == -EFBIG || ret == -EAGAIN)
2752+
if (ret == -EAGAIN || ret == -EFBIG || ret == -ESTALE)
27532753
ret = 0;
27542754
return ret;
27552755
}

0 commit comments

Comments
 (0)