diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-15 15:44:41 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-15 15:44:41 -0500 |
commit | 03df25dc0313fbde19534a187eec5829eb16dbc6 (patch) | |
tree | 269de2822a8ce9b771cb6f6a9c317dd8895a79c2 /fs/nfs | |
parent | f6866fecd6fd8e44a6715da09844a4fd1b8484da (diff) | |
parent | 52833e897fd8c6f62b3e5e27291fa9bc803f7460 (diff) |
Merge branch 'hotfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* 'hotfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
NFS: add missing spkm3 strings to mount option parser
NFS: remove error field from nfs_readdir_descriptor_t
NFS: missing spaces in KERN_WARNING
NFS: Allow text-based mounts via compat_sys_mount
NFS: fix reference counting for NFSv4 callback thread
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/callback.c | 18 | ||||
-rw-r--r-- | fs/nfs/dir.c | 8 | ||||
-rw-r--r-- | fs/nfs/nfs4state.c | 4 | ||||
-rw-r--r-- | fs/nfs/super.c | 4 |
4 files changed, 21 insertions, 13 deletions
diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index bd185a572a23..ecc06c619494 100644 --- a/fs/nfs/callback.c +++ b/fs/nfs/callback.c | |||
@@ -105,7 +105,7 @@ static void nfs_callback_svc(struct svc_rqst *rqstp) | |||
105 | */ | 105 | */ |
106 | int nfs_callback_up(void) | 106 | int nfs_callback_up(void) |
107 | { | 107 | { |
108 | struct svc_serv *serv; | 108 | struct svc_serv *serv = NULL; |
109 | int ret = 0; | 109 | int ret = 0; |
110 | 110 | ||
111 | lock_kernel(); | 111 | lock_kernel(); |
@@ -122,24 +122,30 @@ int nfs_callback_up(void) | |||
122 | ret = svc_create_xprt(serv, "tcp", nfs_callback_set_tcpport, | 122 | ret = svc_create_xprt(serv, "tcp", nfs_callback_set_tcpport, |
123 | SVC_SOCK_ANONYMOUS); | 123 | SVC_SOCK_ANONYMOUS); |
124 | if (ret <= 0) | 124 | if (ret <= 0) |
125 | goto out_destroy; | 125 | goto out_err; |
126 | nfs_callback_tcpport = ret; | 126 | nfs_callback_tcpport = ret; |
127 | dprintk("Callback port = 0x%x\n", nfs_callback_tcpport); | 127 | dprintk("Callback port = 0x%x\n", nfs_callback_tcpport); |
128 | 128 | ||
129 | ret = svc_create_thread(nfs_callback_svc, serv); | 129 | ret = svc_create_thread(nfs_callback_svc, serv); |
130 | if (ret < 0) | 130 | if (ret < 0) |
131 | goto out_destroy; | 131 | goto out_err; |
132 | nfs_callback_info.serv = serv; | 132 | nfs_callback_info.serv = serv; |
133 | wait_for_completion(&nfs_callback_info.started); | 133 | wait_for_completion(&nfs_callback_info.started); |
134 | out: | 134 | out: |
135 | /* | ||
136 | * svc_create creates the svc_serv with sv_nrthreads == 1, and then | ||
137 | * svc_create_thread increments that. So we need to call svc_destroy | ||
138 | * on both success and failure so that the refcount is 1 when the | ||
139 | * thread exits. | ||
140 | */ | ||
141 | if (serv) | ||
142 | svc_destroy(serv); | ||
135 | mutex_unlock(&nfs_callback_mutex); | 143 | mutex_unlock(&nfs_callback_mutex); |
136 | unlock_kernel(); | 144 | unlock_kernel(); |
137 | return ret; | 145 | return ret; |
138 | out_destroy: | 146 | out_err: |
139 | dprintk("Couldn't create callback socket or server thread; err = %d\n", | 147 | dprintk("Couldn't create callback socket or server thread; err = %d\n", |
140 | ret); | 148 | ret); |
141 | svc_destroy(serv); | ||
142 | out_err: | ||
143 | nfs_callback_info.users--; | 149 | nfs_callback_info.users--; |
144 | goto out; | 150 | goto out; |
145 | } | 151 | } |
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 476cb0f837fd..ae04892a5e5d 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -154,7 +154,6 @@ typedef struct { | |||
154 | struct nfs_entry *entry; | 154 | struct nfs_entry *entry; |
155 | decode_dirent_t decode; | 155 | decode_dirent_t decode; |
156 | int plus; | 156 | int plus; |
157 | int error; | ||
158 | unsigned long timestamp; | 157 | unsigned long timestamp; |
159 | int timestamp_valid; | 158 | int timestamp_valid; |
160 | } nfs_readdir_descriptor_t; | 159 | } nfs_readdir_descriptor_t; |
@@ -213,7 +212,6 @@ int nfs_readdir_filler(nfs_readdir_descriptor_t *desc, struct page *page) | |||
213 | return 0; | 212 | return 0; |
214 | error: | 213 | error: |
215 | unlock_page(page); | 214 | unlock_page(page); |
216 | desc->error = error; | ||
217 | return -EIO; | 215 | return -EIO; |
218 | } | 216 | } |
219 | 217 | ||
@@ -483,13 +481,13 @@ int uncached_readdir(nfs_readdir_descriptor_t *desc, void *dirent, | |||
483 | goto out; | 481 | goto out; |
484 | } | 482 | } |
485 | timestamp = jiffies; | 483 | timestamp = jiffies; |
486 | desc->error = NFS_PROTO(inode)->readdir(file->f_path.dentry, cred, *desc->dir_cookie, | 484 | status = NFS_PROTO(inode)->readdir(file->f_path.dentry, cred, |
487 | page, | 485 | *desc->dir_cookie, page, |
488 | NFS_SERVER(inode)->dtsize, | 486 | NFS_SERVER(inode)->dtsize, |
489 | desc->plus); | 487 | desc->plus); |
490 | desc->page = page; | 488 | desc->page = page; |
491 | desc->ptr = kmap(page); /* matching kunmap in nfs_do_filldir */ | 489 | desc->ptr = kmap(page); /* matching kunmap in nfs_do_filldir */ |
492 | if (desc->error >= 0) { | 490 | if (status >= 0) { |
493 | desc->timestamp = timestamp; | 491 | desc->timestamp = timestamp; |
494 | desc->timestamp_valid = 1; | 492 | desc->timestamp_valid = 1; |
495 | if ((status = dir_decode(desc)) == 0) | 493 | if ((status = dir_decode(desc)) == 0) |
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index f9c7432471dc..6233eb5e98c1 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c | |||
@@ -682,8 +682,8 @@ static void nfs_increment_seqid(int status, struct nfs_seqid *seqid) | |||
682 | if (seqid->sequence->flags & NFS_SEQID_CONFIRMED) | 682 | if (seqid->sequence->flags & NFS_SEQID_CONFIRMED) |
683 | return; | 683 | return; |
684 | printk(KERN_WARNING "NFS: v4 server returned a bad" | 684 | printk(KERN_WARNING "NFS: v4 server returned a bad" |
685 | "sequence-id error on an" | 685 | " sequence-id error on an" |
686 | "unconfirmed sequence %p!\n", | 686 | " unconfirmed sequence %p!\n", |
687 | seqid->sequence); | 687 | seqid->sequence); |
688 | case -NFS4ERR_STALE_CLIENTID: | 688 | case -NFS4ERR_STALE_CLIENTID: |
689 | case -NFS4ERR_STALE_STATEID: | 689 | case -NFS4ERR_STALE_STATEID: |
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 7f4505f6ac6f..1fb381843650 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -190,6 +190,10 @@ static match_table_t nfs_secflavor_tokens = { | |||
190 | { Opt_sec_lkeyi, "lkeyi" }, | 190 | { Opt_sec_lkeyi, "lkeyi" }, |
191 | { Opt_sec_lkeyp, "lkeyp" }, | 191 | { Opt_sec_lkeyp, "lkeyp" }, |
192 | 192 | ||
193 | { Opt_sec_spkm, "spkm3" }, | ||
194 | { Opt_sec_spkmi, "spkm3i" }, | ||
195 | { Opt_sec_spkmp, "spkm3p" }, | ||
196 | |||
193 | { Opt_sec_err, NULL } | 197 | { Opt_sec_err, NULL } |
194 | }; | 198 | }; |
195 | 199 | ||