Commit a5948745 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'ceph-for-6.4-rc3' of https://github.com/ceph/ceph-client

Pull ceph fixes from Ilya Dryomov:
 "A workaround for a just discovered bug in MClientSnap encoding which
  goes back to 2017 (marked for stable) and a fixup to quieten a static
  checker"

* tag 'ceph-for-6.4-rc3' of https://github.com/ceph/ceph-client:
  ceph: force updating the msg pointer in non-split case
  ceph: silence smatch warning in reconnect_caps_cb()
parents d3f70431 4cafd040
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3942,7 +3942,7 @@ static int reconnect_caps_cb(struct inode *inode, int mds, void *arg)
	struct dentry *dentry;
	struct ceph_cap *cap;
	char *path;
	int pathlen = 0, err = 0;
	int pathlen = 0, err;
	u64 pathbase;
	u64 snap_follows;

@@ -3965,6 +3965,7 @@ static int reconnect_caps_cb(struct inode *inode, int mds, void *arg)
	cap = __get_cap_for_mds(ci, mds);
	if (!cap) {
		spin_unlock(&ci->i_ceph_lock);
		err = 0;
		goto out_err;
	}
	dout(" adding %p ino %llx.%llx cap %p %lld %s\n",
+13 −0
Original line number Diff line number Diff line
@@ -1111,6 +1111,19 @@ void ceph_handle_snap(struct ceph_mds_client *mdsc,
				continue;
			adjust_snap_realm_parent(mdsc, child, realm->ino);
		}
	} else {
		/*
		 * In the non-split case both 'num_split_inos' and
		 * 'num_split_realms' should be 0, making this a no-op.
		 * However the MDS happens to populate 'split_realms' list
		 * in one of the UPDATE op cases by mistake.
		 *
		 * Skip both lists just in case to ensure that 'p' is
		 * positioned at the start of realm info, as expected by
		 * ceph_update_snap_trace().
		 */
		p += sizeof(u64) * num_split_inos;
		p += sizeof(u64) * num_split_realms;
	}

	/*