summaryrefslogtreecommitdiff
path: root/fs/ceph
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2016-04-28 17:07:25 +0300
committerIlya Dryomov <idryomov@gmail.com>2016-05-31 00:00:22 +0300
commitb7ec35b304b64af2830027350cc99d31e6e537c2 (patch)
treec578df39d847e08e88db9d6f5e1b7e5cd4df86b5 /fs/ceph
parent1a695a905c18548062509178b98bc91e67510864 (diff)
downloadlinux-b7ec35b304b64af2830027350cc99d31e6e537c2.tar.xz
libceph: change ceph_osdmap_flag() to take osdc
For the benefit of every single caller, take osdc instead of map. Also, now that osdc->osdmap can't ever be NULL, drop the check. Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/file.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index a888df6f2d71..8eeb9f579db5 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -1349,7 +1349,7 @@ static ssize_t ceph_write_iter(struct kiocb *iocb, struct iov_iter *from)
}
retry_snap:
- if (ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_FULL)) {
+ if (ceph_osdmap_flag(osdc, CEPH_OSDMAP_FULL)) {
err = -ENOSPC;
goto out;
}
@@ -1440,7 +1440,7 @@ retry_snap:
ceph_put_cap_refs(ci, got);
if (written >= 0) {
- if (ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_NEARFULL))
+ if (ceph_osdmap_flag(osdc, CEPH_OSDMAP_NEARFULL))
iocb->ki_flags |= IOCB_DSYNC;
written = generic_write_sync(iocb, written);
@@ -1672,8 +1672,8 @@ static long ceph_fallocate(struct file *file, int mode,
goto unlock;
}
- if (ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_FULL) &&
- !(mode & FALLOC_FL_PUNCH_HOLE)) {
+ if (ceph_osdmap_flag(osdc, CEPH_OSDMAP_FULL) &&
+ !(mode & FALLOC_FL_PUNCH_HOLE)) {
ret = -ENOSPC;
goto unlock;
}