Skip to content

Commit

Permalink
Merge branch 'hotfixes' of git://git.linux-nfs.org/projects/trondmy/n…
Browse files Browse the repository at this point in the history
…fs-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
  • Loading branch information
Linus Torvalds committed Feb 15, 2008
2 parents f6866fe + 52833e8 commit 03df25d
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 16 deletions.
3 changes: 0 additions & 3 deletions fs/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -702,9 +702,6 @@ static int do_nfs4_super_data_conv(void *raw_data)
real->flags = raw->flags;
real->version = raw->version;
}
else {
return -EINVAL;
}

return 0;
}
Expand Down
18 changes: 12 additions & 6 deletions fs/nfs/callback.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ static void nfs_callback_svc(struct svc_rqst *rqstp)
*/
int nfs_callback_up(void)
{
struct svc_serv *serv;
struct svc_serv *serv = NULL;
int ret = 0;

lock_kernel();
Expand All @@ -122,24 +122,30 @@ int nfs_callback_up(void)
ret = svc_create_xprt(serv, "tcp", nfs_callback_set_tcpport,
SVC_SOCK_ANONYMOUS);
if (ret <= 0)
goto out_destroy;
goto out_err;
nfs_callback_tcpport = ret;
dprintk("Callback port = 0x%x\n", nfs_callback_tcpport);

ret = svc_create_thread(nfs_callback_svc, serv);
if (ret < 0)
goto out_destroy;
goto out_err;
nfs_callback_info.serv = serv;
wait_for_completion(&nfs_callback_info.started);
out:
/*
* svc_create creates the svc_serv with sv_nrthreads == 1, and then
* svc_create_thread increments that. So we need to call svc_destroy
* on both success and failure so that the refcount is 1 when the
* thread exits.
*/
if (serv)
svc_destroy(serv);
mutex_unlock(&nfs_callback_mutex);
unlock_kernel();
return ret;
out_destroy:
out_err:
dprintk("Couldn't create callback socket or server thread; err = %d\n",
ret);
svc_destroy(serv);
out_err:
nfs_callback_info.users--;
goto out;
}
Expand Down
8 changes: 3 additions & 5 deletions fs/nfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ typedef struct {
struct nfs_entry *entry;
decode_dirent_t decode;
int plus;
int error;
unsigned long timestamp;
int timestamp_valid;
} nfs_readdir_descriptor_t;
Expand Down Expand Up @@ -213,7 +212,6 @@ int nfs_readdir_filler(nfs_readdir_descriptor_t *desc, struct page *page)
return 0;
error:
unlock_page(page);
desc->error = error;
return -EIO;
}

Expand Down Expand Up @@ -483,13 +481,13 @@ int uncached_readdir(nfs_readdir_descriptor_t *desc, void *dirent,
goto out;
}
timestamp = jiffies;
desc->error = NFS_PROTO(inode)->readdir(file->f_path.dentry, cred, *desc->dir_cookie,
page,
status = NFS_PROTO(inode)->readdir(file->f_path.dentry, cred,
*desc->dir_cookie, page,
NFS_SERVER(inode)->dtsize,
desc->plus);
desc->page = page;
desc->ptr = kmap(page); /* matching kunmap in nfs_do_filldir */
if (desc->error >= 0) {
if (status >= 0) {
desc->timestamp = timestamp;
desc->timestamp_valid = 1;
if ((status = dir_decode(desc)) == 0)
Expand Down
4 changes: 2 additions & 2 deletions fs/nfs/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -682,8 +682,8 @@ static void nfs_increment_seqid(int status, struct nfs_seqid *seqid)
if (seqid->sequence->flags & NFS_SEQID_CONFIRMED)
return;
printk(KERN_WARNING "NFS: v4 server returned a bad"
"sequence-id error on an"
"unconfirmed sequence %p!\n",
" sequence-id error on an"
" unconfirmed sequence %p!\n",
seqid->sequence);
case -NFS4ERR_STALE_CLIENTID:
case -NFS4ERR_STALE_STATEID:
Expand Down
4 changes: 4 additions & 0 deletions fs/nfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,10 @@ static match_table_t nfs_secflavor_tokens = {
{ Opt_sec_lkeyi, "lkeyi" },
{ Opt_sec_lkeyp, "lkeyp" },

{ Opt_sec_spkm, "spkm3" },
{ Opt_sec_spkmi, "spkm3i" },
{ Opt_sec_spkmp, "spkm3p" },

{ Opt_sec_err, NULL }
};

Expand Down

0 comments on commit 03df25d

Please sign in to comment.