diff options
| author | Jeff Garzik <jeff@garzik.org> | 2006-04-27 04:55:26 -0400 |
|---|---|---|
| committer | Jeff Garzik <jeff@garzik.org> | 2006-04-27 04:55:26 -0400 |
| commit | 9a375e93f88269bb770fb2eaa57554c975449c88 (patch) | |
| tree | 4c8f6d77f0aa94fc69c5b9e75d51db1451bdf66f /fs/nfs | |
| parent | b2b4b9a7c09ad66e095b13c97946a96f2dc8284e (diff) | |
| parent | acc696d93dcf993dec123d69d599979e1456ffec (diff) | |
Merge branch 'upstream' into max-sect
Diffstat (limited to 'fs/nfs')
| -rw-r--r-- | fs/nfs/dir.c | 5 | ||||
| -rw-r--r-- | fs/nfs/direct.c | 8 | ||||
| -rw-r--r-- | fs/nfs/file.c | 5 | ||||
| -rw-r--r-- | fs/nfs/inode.c | 5 | ||||
| -rw-r--r-- | fs/nfs/nfs4proc.c | 10 |
5 files changed, 14 insertions, 19 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index a23f34894167..cae74dd4c7f5 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
| @@ -128,15 +128,14 @@ struct inode_operations nfs4_dir_inode_operations = { | |||
| 128 | static int | 128 | static int |
| 129 | nfs_opendir(struct inode *inode, struct file *filp) | 129 | nfs_opendir(struct inode *inode, struct file *filp) |
| 130 | { | 130 | { |
| 131 | int res = 0; | 131 | int res; |
| 132 | 132 | ||
| 133 | dfprintk(VFS, "NFS: opendir(%s/%ld)\n", | 133 | dfprintk(VFS, "NFS: opendir(%s/%ld)\n", |
| 134 | inode->i_sb->s_id, inode->i_ino); | 134 | inode->i_sb->s_id, inode->i_ino); |
| 135 | 135 | ||
| 136 | lock_kernel(); | 136 | lock_kernel(); |
| 137 | /* Call generic open code in order to cache credentials */ | 137 | /* Call generic open code in order to cache credentials */ |
| 138 | if (!res) | 138 | res = nfs_open(inode, filp); |
| 139 | res = nfs_open(inode, filp); | ||
| 140 | unlock_kernel(); | 139 | unlock_kernel(); |
| 141 | return res; | 140 | return res; |
| 142 | } | 141 | } |
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index 0f583cb16ddb..3c72b0c07283 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c | |||
| @@ -112,10 +112,9 @@ static void nfs_direct_write_complete(struct nfs_direct_req *dreq, struct inode | |||
| 112 | */ | 112 | */ |
| 113 | ssize_t nfs_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov, loff_t pos, unsigned long nr_segs) | 113 | ssize_t nfs_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov, loff_t pos, unsigned long nr_segs) |
| 114 | { | 114 | { |
| 115 | struct dentry *dentry = iocb->ki_filp->f_dentry; | ||
| 116 | |||
| 117 | dprintk("NFS: nfs_direct_IO (%s) off/no(%Ld/%lu) EINVAL\n", | 115 | dprintk("NFS: nfs_direct_IO (%s) off/no(%Ld/%lu) EINVAL\n", |
| 118 | dentry->d_name.name, (long long) pos, nr_segs); | 116 | iocb->ki_filp->f_dentry->d_name.name, |
| 117 | (long long) pos, nr_segs); | ||
| 119 | 118 | ||
| 120 | return -EINVAL; | 119 | return -EINVAL; |
| 121 | } | 120 | } |
| @@ -468,7 +467,6 @@ static const struct rpc_call_ops nfs_commit_direct_ops = { | |||
| 468 | static void nfs_direct_commit_schedule(struct nfs_direct_req *dreq) | 467 | static void nfs_direct_commit_schedule(struct nfs_direct_req *dreq) |
| 469 | { | 468 | { |
| 470 | struct nfs_write_data *data = dreq->commit_data; | 469 | struct nfs_write_data *data = dreq->commit_data; |
| 471 | struct rpc_task *task = &data->task; | ||
| 472 | 470 | ||
| 473 | data->inode = dreq->inode; | 471 | data->inode = dreq->inode; |
| 474 | data->cred = dreq->ctx->cred; | 472 | data->cred = dreq->ctx->cred; |
| @@ -489,7 +487,7 @@ static void nfs_direct_commit_schedule(struct nfs_direct_req *dreq) | |||
| 489 | /* Note: task.tk_ops->rpc_release will free dreq->commit_data */ | 487 | /* Note: task.tk_ops->rpc_release will free dreq->commit_data */ |
| 490 | dreq->commit_data = NULL; | 488 | dreq->commit_data = NULL; |
| 491 | 489 | ||
| 492 | dprintk("NFS: %5u initiated commit call\n", task->tk_pid); | 490 | dprintk("NFS: %5u initiated commit call\n", data->task.tk_pid); |
| 493 | 491 | ||
| 494 | lock_kernel(); | 492 | lock_kernel(); |
| 495 | rpc_execute(&data->task); | 493 | rpc_execute(&data->task); |
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index f1df2c8d9259..fade02c15e6e 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c | |||
| @@ -534,10 +534,9 @@ static int nfs_lock(struct file *filp, int cmd, struct file_lock *fl) | |||
| 534 | */ | 534 | */ |
| 535 | static int nfs_flock(struct file *filp, int cmd, struct file_lock *fl) | 535 | static int nfs_flock(struct file *filp, int cmd, struct file_lock *fl) |
| 536 | { | 536 | { |
| 537 | struct inode * inode = filp->f_mapping->host; | ||
| 538 | |||
| 539 | dprintk("NFS: nfs_flock(f=%s/%ld, t=%x, fl=%x)\n", | 537 | dprintk("NFS: nfs_flock(f=%s/%ld, t=%x, fl=%x)\n", |
| 540 | inode->i_sb->s_id, inode->i_ino, | 538 | filp->f_dentry->d_inode->i_sb->s_id, |
| 539 | filp->f_dentry->d_inode->i_ino, | ||
| 541 | fl->fl_type, fl->fl_flags); | 540 | fl->fl_type, fl->fl_flags); |
| 542 | 541 | ||
| 543 | /* | 542 | /* |
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 2f7656b911b6..d0b991a92327 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
| @@ -700,12 +700,9 @@ static int nfs_show_stats(struct seq_file *m, struct vfsmount *mnt) | |||
| 700 | /* | 700 | /* |
| 701 | * Display superblock I/O counters | 701 | * Display superblock I/O counters |
| 702 | */ | 702 | */ |
| 703 | for (cpu = 0; cpu < NR_CPUS; cpu++) { | 703 | for_each_possible_cpu(cpu) { |
| 704 | struct nfs_iostats *stats; | 704 | struct nfs_iostats *stats; |
| 705 | 705 | ||
| 706 | if (!cpu_possible(cpu)) | ||
| 707 | continue; | ||
| 708 | |||
| 709 | preempt_disable(); | 706 | preempt_disable(); |
| 710 | stats = per_cpu_ptr(nfss->io_stats, cpu); | 707 | stats = per_cpu_ptr(nfss->io_stats, cpu); |
| 711 | 708 | ||
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 47ece1dd3c67..d86c0db7b1e8 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
| @@ -1218,7 +1218,7 @@ out: | |||
| 1218 | return status; | 1218 | return status; |
| 1219 | } | 1219 | } |
| 1220 | 1220 | ||
| 1221 | static void nfs4_intent_set_file(struct nameidata *nd, struct dentry *dentry, struct nfs4_state *state) | 1221 | static int nfs4_intent_set_file(struct nameidata *nd, struct dentry *dentry, struct nfs4_state *state) |
| 1222 | { | 1222 | { |
| 1223 | struct file *filp; | 1223 | struct file *filp; |
| 1224 | 1224 | ||
| @@ -1227,8 +1227,10 @@ static void nfs4_intent_set_file(struct nameidata *nd, struct dentry *dentry, st | |||
| 1227 | struct nfs_open_context *ctx; | 1227 | struct nfs_open_context *ctx; |
| 1228 | ctx = (struct nfs_open_context *)filp->private_data; | 1228 | ctx = (struct nfs_open_context *)filp->private_data; |
| 1229 | ctx->state = state; | 1229 | ctx->state = state; |
| 1230 | } else | 1230 | return 0; |
| 1231 | nfs4_close_state(state, nd->intent.open.flags); | 1231 | } |
| 1232 | nfs4_close_state(state, nd->intent.open.flags); | ||
| 1233 | return PTR_ERR(filp); | ||
| 1232 | } | 1234 | } |
| 1233 | 1235 | ||
| 1234 | struct dentry * | 1236 | struct dentry * |
| @@ -1835,7 +1837,7 @@ nfs4_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr, | |||
| 1835 | nfs_setattr_update_inode(state->inode, sattr); | 1837 | nfs_setattr_update_inode(state->inode, sattr); |
| 1836 | } | 1838 | } |
| 1837 | if (status == 0 && nd != NULL && (nd->flags & LOOKUP_OPEN)) | 1839 | if (status == 0 && nd != NULL && (nd->flags & LOOKUP_OPEN)) |
| 1838 | nfs4_intent_set_file(nd, dentry, state); | 1840 | status = nfs4_intent_set_file(nd, dentry, state); |
| 1839 | else | 1841 | else |
| 1840 | nfs4_close_state(state, flags); | 1842 | nfs4_close_state(state, flags); |
| 1841 | out: | 1843 | out: |
