Commit c460f4e4 authored by Xiubo Li's avatar Xiubo Li Committed by Ilya Dryomov
Browse files

ceph: remove useless check for the folio



The netfs_write_begin() won't set the folio if the return value
is non-zero.

Signed-off-by: default avatarXiubo Li <xiubli@redhat.com>
Reviewed-by: default avatarIlya Dryomov <idryomov@gmail.com>
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent 7cb99947
Loading
Loading
Loading
Loading
+7 −10
Original line number Diff line number Diff line
@@ -1326,16 +1326,13 @@ static int ceph_write_begin(struct file *file, struct address_space *mapping,
	int r;

	r = netfs_write_begin(&ci->netfs, file, inode->i_mapping, pos, len, &folio, NULL);
	if (r == 0)
	if (r < 0)
		return r;

	folio_wait_fscache(folio);
	if (r < 0) {
		if (folio)
			folio_put(folio);
	} else {
	WARN_ON_ONCE(!folio_test_locked(folio));
	*pagep = &folio->page;
	}
	return r;
	return 0;
}

/*