Skip to content

Commit a1ef447

Browse files
committed
Merge tag 'ceph-for-6.6-rc6' of https://github.com/ceph/ceph-client
Pull ceph fixes from Ilya Dryomov: "Fixes for an overreaching WARN_ON, two error paths and a switch to kernel_connect() which recently grown protection against someone using BPF to rewrite the address. All but one marked for stable" * tag 'ceph-for-6.6-rc6' of https://github.com/ceph/ceph-client: ceph: fix type promotion bug on 32bit systems libceph: use kernel_connect() ceph: remove unnecessary IS_ERR() check in ceph_fname_to_usr() ceph: fix incorrect revoked caps assert in ceph_fill_file_size()
2 parents ad7f1ba + 07bb00e commit a1ef447

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

fs/ceph/crypto.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ int ceph_fname_to_usr(const struct ceph_fname *fname, struct fscrypt_str *tname,
460460
out:
461461
fscrypt_fname_free_buffer(&_tname);
462462
out_inode:
463-
if ((dir != fname->dir) && !IS_ERR(dir)) {
463+
if (dir != fname->dir) {
464464
if ((dir->i_state & I_NEW))
465465
discard_new_inode(dir);
466466
else

fs/ceph/file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2969,7 +2969,7 @@ static ssize_t __ceph_copy_file_range(struct file *src_file, loff_t src_off,
29692969
ret = do_splice_direct(src_file, &src_off, dst_file,
29702970
&dst_off, src_objlen, flags);
29712971
/* Abort on short copies or on error */
2972-
if (ret < src_objlen) {
2972+
if (ret < (long)src_objlen) {
29732973
dout("Failed partial copy (%zd)\n", ret);
29742974
goto out;
29752975
}

fs/ceph/inode.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -769,9 +769,7 @@ int ceph_fill_file_size(struct inode *inode, int issued,
769769
ci->i_truncate_seq = truncate_seq;
770770

771771
/* the MDS should have revoked these caps */
772-
WARN_ON_ONCE(issued & (CEPH_CAP_FILE_EXCL |
773-
CEPH_CAP_FILE_RD |
774-
CEPH_CAP_FILE_WR |
772+
WARN_ON_ONCE(issued & (CEPH_CAP_FILE_RD |
775773
CEPH_CAP_FILE_LAZYIO));
776774
/*
777775
* If we hold relevant caps, or in the case where we're

net/ceph/messenger.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,8 +459,8 @@ int ceph_tcp_connect(struct ceph_connection *con)
459459
set_sock_callbacks(sock, con);
460460

461461
con_sock_state_connecting(con);
462-
ret = sock->ops->connect(sock, (struct sockaddr *)&ss, sizeof(ss),
463-
O_NONBLOCK);
462+
ret = kernel_connect(sock, (struct sockaddr *)&ss, sizeof(ss),
463+
O_NONBLOCK);
464464
if (ret == -EINPROGRESS) {
465465
dout("connect %s EINPROGRESS sk_state = %u\n",
466466
ceph_pr_addr(&con->peer_addr),

0 commit comments

Comments
 (0)