Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d93ac51c authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
  ceph: remove bad auth_x kmem_cache
  ceph: fix lockless caps check
  ceph: clear dir complete, invalidate dentry on replayed rename
  ceph: fix direct io truncate offset
  ceph: discard incoming messages with bad seq #
  ceph: fix seq counting for skipped messages
  ceph: add missing #includes
  ceph: fix leaked spinlock during mds reconnect
  ceph: print more useful version info on module load
  ceph: fix snap realm splits
  ceph: clear dir complete on d_move
parents 37e27e36 b0930f8d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -509,7 +509,7 @@ static void writepages_finish(struct ceph_osd_request *req,
	u64 bytes = 0;
	struct ceph_client *client = ceph_inode_to_client(inode);
	long writeback_stat;
	unsigned issued = __ceph_caps_issued(ci, NULL);
	unsigned issued = ceph_caps_issued(ci);

	/* parse reply */
	replyhead = msg->front.iov_base;
+1 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/err.h>
#include <linux/slab.h>

#include "types.h"
#include "auth_none.h"
+2 −0
Original line number Diff line number Diff line
#ifndef _FS_CEPH_AUTH_NONE_H
#define _FS_CEPH_AUTH_NONE_H

#include <linux/slab.h>

#include "auth.h"

/*
+10 −22
Original line number Diff line number Diff line
@@ -12,8 +12,6 @@
#include "auth.h"
#include "decode.h"

struct kmem_cache *ceph_x_ticketbuf_cachep;

#define TEMP_TICKET_BUF_LEN	256

static void ceph_x_validate_tickets(struct ceph_auth_client *ac, int *pneed);
@@ -131,13 +129,12 @@ static int ceph_x_proc_ticket_reply(struct ceph_auth_client *ac,
	char *ticket_buf;
	u8 struct_v;

	dbuf = kmem_cache_alloc(ceph_x_ticketbuf_cachep, GFP_NOFS | GFP_ATOMIC);
	dbuf = kmalloc(TEMP_TICKET_BUF_LEN, GFP_NOFS);
	if (!dbuf)
		return -ENOMEM;

	ret = -ENOMEM;
	ticket_buf = kmem_cache_alloc(ceph_x_ticketbuf_cachep,
				      GFP_NOFS | GFP_ATOMIC);
	ticket_buf = kmalloc(TEMP_TICKET_BUF_LEN, GFP_NOFS);
	if (!ticket_buf)
		goto out_dbuf;

@@ -251,9 +248,9 @@ static int ceph_x_proc_ticket_reply(struct ceph_auth_client *ac,

	ret = 0;
out:
	kmem_cache_free(ceph_x_ticketbuf_cachep, ticket_buf);
	kfree(ticket_buf);
out_dbuf:
	kmem_cache_free(ceph_x_ticketbuf_cachep, dbuf);
	kfree(dbuf);
	return ret;

bad:
@@ -605,8 +602,6 @@ static void ceph_x_destroy(struct ceph_auth_client *ac)
		remove_ticket_handler(ac, th);
	}

	kmem_cache_destroy(ceph_x_ticketbuf_cachep);

	kfree(ac->private);
	ac->private = NULL;
}
@@ -641,26 +636,20 @@ int ceph_x_init(struct ceph_auth_client *ac)
	int ret;

	dout("ceph_x_init %p\n", ac);
	ret = -ENOMEM;
	xi = kzalloc(sizeof(*xi), GFP_NOFS);
	if (!xi)
		return -ENOMEM;
		goto out;

	ret = -ENOMEM;
	ceph_x_ticketbuf_cachep = kmem_cache_create("ceph_x_ticketbuf",
				      TEMP_TICKET_BUF_LEN, 8,
				      (SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD),
				      NULL);
	if (!ceph_x_ticketbuf_cachep)
		goto done_nomem;
	ret = -EINVAL;
	if (!ac->secret) {
		pr_err("no secret set (for auth_x protocol)\n");
		goto done_nomem;
		goto out_nomem;
	}

	ret = ceph_crypto_key_unarmor(&xi->secret, ac->secret);
	if (ret)
		goto done_nomem;
		goto out_nomem;

	xi->starting = true;
	xi->ticket_handlers = RB_ROOT;
@@ -670,10 +659,9 @@ int ceph_x_init(struct ceph_auth_client *ac)
	ac->ops = &ceph_x_ops;
	return 0;

done_nomem:
out_nomem:
	kfree(xi);
	if (ceph_x_ticketbuf_cachep)
		kmem_cache_destroy(ceph_x_ticketbuf_cachep);
out:
	return ret;
}

+1 −1
Original line number Diff line number Diff line
@@ -1861,8 +1861,8 @@ static void kick_flushing_capsnaps(struct ceph_mds_client *mdsc,
		} else {
			pr_err("%p auth cap %p not mds%d ???\n", inode,
			       cap, session->s_mds);
			spin_unlock(&inode->i_lock);
		}
		spin_unlock(&inode->i_lock);
	}
}

Loading