Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26032
b: refs/heads/master
c: f80887d
h: refs/heads/master
v: v3
  • Loading branch information
Roland Dreier committed Apr 19, 2006
1 parent ae07693 commit f8e5d80
Show file tree
Hide file tree
Showing 13 changed files with 42 additions and 41 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 949b211235cf301790ef4fb903af65d71be29b2a
refs/heads/master: f80887d0b9e1af481dc4a30fc145dfed24ddfd59
18 changes: 11 additions & 7 deletions trunk/drivers/infiniband/ulp/srp/ib_srp.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,14 @@ static void srp_unmap_data(struct scsi_cmnd *scmnd,
scmnd->sc_data_direction);
}

static void srp_remove_req(struct srp_target_port *target, struct srp_request *req,
int index)
{
list_del(&req->list);
req->next = target->req_head;
target->req_head = index;
}

static void srp_process_rsp(struct srp_target_port *target, struct srp_rsp *rsp)
{
struct srp_request *req;
Expand Down Expand Up @@ -664,9 +672,7 @@ static void srp_process_rsp(struct srp_target_port *target, struct srp_rsp *rsp)
scmnd->host_scribble = (void *) -1L;
scmnd->scsi_done(scmnd);

list_del(&req->list);
req->next = target->req_head;
target->req_head = rsp->tag & ~SRP_TAG_TSK_MGMT;
srp_remove_req(target, req, rsp->tag & ~SRP_TAG_TSK_MGMT);
} else
req->cmd_done = 1;
}
Expand Down Expand Up @@ -1188,12 +1194,10 @@ static int srp_send_tsk_mgmt(struct scsi_cmnd *scmnd, u8 func)
spin_lock_irq(target->scsi_host->host_lock);

if (req->cmd_done) {
list_del(&req->list);
req->next = target->req_head;
target->req_head = req_index;

srp_remove_req(target, req, req_index);
scmnd->scsi_done(scmnd);
} else if (!req->tsk_status) {
srp_remove_req(target, req, req_index);
scmnd->result = DID_ABORT << 16;
ret = SUCCESS;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/lockd/svclock.c
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ static void nlmsvc_grant_callback(struct rpc_task *task, void *data)
svc_wake_up(block->b_daemon);
}

static void nlmsvc_grant_release(void *data)
void nlmsvc_grant_release(void *data)
{
struct nlm_rqst *call = data;

Expand Down
5 changes: 3 additions & 2 deletions trunk/fs/nfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,15 @@ struct inode_operations nfs4_dir_inode_operations = {
static int
nfs_opendir(struct inode *inode, struct file *filp)
{
int res;
int res = 0;

dfprintk(VFS, "NFS: opendir(%s/%ld)\n",
inode->i_sb->s_id, inode->i_ino);

lock_kernel();
/* Call generic open code in order to cache credentials */
res = nfs_open(inode, filp);
if (!res)
res = nfs_open(inode, filp);
unlock_kernel();
return res;
}
Expand Down
8 changes: 5 additions & 3 deletions trunk/fs/nfs/direct.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,10 @@ static void nfs_direct_write_complete(struct nfs_direct_req *dreq, struct inode
*/
ssize_t nfs_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov, loff_t pos, unsigned long nr_segs)
{
struct dentry *dentry = iocb->ki_filp->f_dentry;

dprintk("NFS: nfs_direct_IO (%s) off/no(%Ld/%lu) EINVAL\n",
iocb->ki_filp->f_dentry->d_name.name,
(long long) pos, nr_segs);
dentry->d_name.name, (long long) pos, nr_segs);

return -EINVAL;
}
Expand Down Expand Up @@ -467,6 +468,7 @@ static const struct rpc_call_ops nfs_commit_direct_ops = {
static void nfs_direct_commit_schedule(struct nfs_direct_req *dreq)
{
struct nfs_write_data *data = dreq->commit_data;
struct rpc_task *task = &data->task;

data->inode = dreq->inode;
data->cred = dreq->ctx->cred;
Expand All @@ -487,7 +489,7 @@ static void nfs_direct_commit_schedule(struct nfs_direct_req *dreq)
/* Note: task.tk_ops->rpc_release will free dreq->commit_data */
dreq->commit_data = NULL;

dprintk("NFS: %5u initiated commit call\n", data->task.tk_pid);
dprintk("NFS: %5u initiated commit call\n", task->tk_pid);

lock_kernel();
rpc_execute(&data->task);
Expand Down
5 changes: 3 additions & 2 deletions trunk/fs/nfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -534,9 +534,10 @@ static int nfs_lock(struct file *filp, int cmd, struct file_lock *fl)
*/
static int nfs_flock(struct file *filp, int cmd, struct file_lock *fl)
{
struct inode * inode = filp->f_mapping->host;

dprintk("NFS: nfs_flock(f=%s/%ld, t=%x, fl=%x)\n",
filp->f_dentry->d_inode->i_sb->s_id,
filp->f_dentry->d_inode->i_ino,
inode->i_sb->s_id, inode->i_ino,
fl->fl_type, fl->fl_flags);

/*
Expand Down
5 changes: 4 additions & 1 deletion trunk/fs/nfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -700,9 +700,12 @@ static int nfs_show_stats(struct seq_file *m, struct vfsmount *mnt)
/*
* Display superblock I/O counters
*/
for_each_possible_cpu(cpu) {
for (cpu = 0; cpu < NR_CPUS; cpu++) {
struct nfs_iostats *stats;

if (!cpu_possible(cpu))
continue;

preempt_disable();
stats = per_cpu_ptr(nfss->io_stats, cpu);

Expand Down
10 changes: 4 additions & 6 deletions trunk/fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1218,7 +1218,7 @@ int nfs4_do_close(struct inode *inode, struct nfs4_state *state)
return status;
}

static int nfs4_intent_set_file(struct nameidata *nd, struct dentry *dentry, struct nfs4_state *state)
static void nfs4_intent_set_file(struct nameidata *nd, struct dentry *dentry, struct nfs4_state *state)
{
struct file *filp;

Expand All @@ -1227,10 +1227,8 @@ static int nfs4_intent_set_file(struct nameidata *nd, struct dentry *dentry, str
struct nfs_open_context *ctx;
ctx = (struct nfs_open_context *)filp->private_data;
ctx->state = state;
return 0;
}
nfs4_close_state(state, nd->intent.open.flags);
return PTR_ERR(filp);
} else
nfs4_close_state(state, nd->intent.open.flags);
}

struct dentry *
Expand Down Expand Up @@ -1837,7 +1835,7 @@ nfs4_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr,
nfs_setattr_update_inode(state->inode, sattr);
}
if (status == 0 && nd != NULL && (nd->flags & LOOKUP_OPEN))
status = nfs4_intent_set_file(nd, dentry, state);
nfs4_intent_set_file(nd, dentry, state);
else
nfs4_close_state(state, flags);
out:
Expand Down
12 changes: 0 additions & 12 deletions trunk/include/linux/sunrpc/metrics.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,9 @@ struct rpc_clnt;
/*
* EXPORTed functions for managing rpc_iostats structures
*/

#ifdef CONFIG_PROC_FS

struct rpc_iostats * rpc_alloc_iostats(struct rpc_clnt *);
void rpc_count_iostats(struct rpc_task *);
void rpc_print_iostats(struct seq_file *, struct rpc_clnt *);
void rpc_free_iostats(struct rpc_iostats *);

#else /* CONFIG_PROC_FS */

static inline struct rpc_iostats *rpc_alloc_iostats(struct rpc_clnt *clnt) { return NULL; }
static inline void rpc_count_iostats(struct rpc_task *task) {}
static inline void rpc_print_iostats(struct seq_file *seq, struct rpc_clnt *clnt) {}
static inline void rpc_free_iostats(struct rpc_iostats *stats) {}

#endif /* CONFIG_PROC_FS */

#endif /* _LINUX_SUNRPC_METRICS_H */
1 change: 0 additions & 1 deletion trunk/include/linux/sunrpc/xprt.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ struct rpc_timeout {

struct rpc_task;
struct rpc_xprt;
struct seq_file;

/*
* This describes a complete RPC request
Expand Down
1 change: 1 addition & 0 deletions trunk/net/sunrpc/auth_gss/auth_gss.c
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,7 @@ gss_create_cred(struct rpc_auth *auth, struct auth_cred *acred, int flags)

out_err:
dprintk("RPC: gss_create_cred failed with error %d\n", err);
if (cred) gss_destroy_cred(&cred->gc_base);
return ERR_PTR(err);
}

Expand Down
11 changes: 8 additions & 3 deletions trunk/net/sunrpc/auth_gss/gss_krb5_crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ make_checksum(s32 cksumtype, char *header, int hdrlen, struct xdr_buf *body,
char *cksumname;
struct crypto_tfm *tfm = NULL; /* XXX add to ctx? */
struct scatterlist sg[1];
u32 code = GSS_S_FAILURE;

switch (cksumtype) {
case CKSUMTYPE_RSA_MD5:
Expand All @@ -220,20 +221,24 @@ make_checksum(s32 cksumtype, char *header, int hdrlen, struct xdr_buf *body,
default:
dprintk("RPC: krb5_make_checksum:"
" unsupported checksum %d", cksumtype);
return GSS_S_FAILURE;
goto out;
}
if (!(tfm = crypto_alloc_tfm(cksumname, CRYPTO_TFM_REQ_MAY_SLEEP)))
return GSS_S_FAILURE;
goto out;
cksum->len = crypto_tfm_alg_digestsize(tfm);
if ((cksum->data = kmalloc(cksum->len, GFP_KERNEL)) == NULL)
goto out;

crypto_digest_init(tfm);
sg_set_buf(sg, header, hdrlen);
crypto_digest_update(tfm, sg, 1);
process_xdr_buf(body, body_offset, body->len - body_offset,
checksummer, tfm);
crypto_digest_final(tfm, cksum->data);
code = 0;
out:
crypto_free_tfm(tfm);
return 0;
return code;
}

EXPORT_SYMBOL(make_checksum);
Expand Down
3 changes: 1 addition & 2 deletions trunk/net/sunrpc/stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,7 @@ void rpc_count_iostats(struct rpc_task *task)
op_metrics->om_execute += execute;
}

static void _print_name(struct seq_file *seq, unsigned int op,
struct rpc_procinfo *procs)
void _print_name(struct seq_file *seq, unsigned int op, struct rpc_procinfo *procs)
{
if (procs[op].p_name)
seq_printf(seq, "\t%12s: ", procs[op].p_name);
Expand Down

0 comments on commit f8e5d80

Please sign in to comment.