diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-13 13:58:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-13 13:58:45 -0400 |
commit | 4264e6a263fc7166a5aa5234819b94f6fc9a2cd2 (patch) | |
tree | 15418e913161c719b738b6defa53cac8ebeb2dfd | |
parent | 8d657eb3b43861064d36241e88d9d61c709f33f0 (diff) | |
parent | f1daf666dd7d097653bd38320248c68084b1febf (diff) |
Merge tag 'nfs-for-3.5-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client bugfixes from Trond Myklebust:
- Fix an NFSv4 mount regression
- Fix O_DIRECT list manipulation snafus
* tag 'nfs-for-3.5-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
NFSv4: Fix an NFSv4 mount regression
NFS: Fix list manipulation snafus in fs/nfs/direct.c
-rw-r--r-- | fs/nfs/direct.c | 6 | ||||
-rw-r--r-- | fs/nfs/super.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index 9a4cbfc85d81..48253372ab1d 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c | |||
@@ -484,6 +484,7 @@ static void nfs_direct_write_reschedule(struct nfs_direct_req *dreq) | |||
484 | 484 | ||
485 | list_for_each_entry_safe(req, tmp, &reqs, wb_list) { | 485 | list_for_each_entry_safe(req, tmp, &reqs, wb_list) { |
486 | if (!nfs_pageio_add_request(&desc, req)) { | 486 | if (!nfs_pageio_add_request(&desc, req)) { |
487 | nfs_list_remove_request(req); | ||
487 | nfs_list_add_request(req, &failed); | 488 | nfs_list_add_request(req, &failed); |
488 | spin_lock(cinfo.lock); | 489 | spin_lock(cinfo.lock); |
489 | dreq->flags = 0; | 490 | dreq->flags = 0; |
@@ -494,8 +495,11 @@ static void nfs_direct_write_reschedule(struct nfs_direct_req *dreq) | |||
494 | } | 495 | } |
495 | nfs_pageio_complete(&desc); | 496 | nfs_pageio_complete(&desc); |
496 | 497 | ||
497 | while (!list_empty(&failed)) | 498 | while (!list_empty(&failed)) { |
499 | req = nfs_list_entry(failed.next); | ||
500 | nfs_list_remove_request(req); | ||
498 | nfs_unlock_and_release_request(req); | 501 | nfs_unlock_and_release_request(req); |
502 | } | ||
499 | 503 | ||
500 | if (put_dreq(dreq)) | 504 | if (put_dreq(dreq)) |
501 | nfs_direct_write_complete(dreq, dreq->inode); | 505 | nfs_direct_write_complete(dreq, dreq->inode); |
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 906f09c7d842..06228192f64e 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -2860,6 +2860,8 @@ static struct dentry *nfs4_try_mount(int flags, const char *dev_name, | |||
2860 | 2860 | ||
2861 | dfprintk(MOUNT, "--> nfs4_try_mount()\n"); | 2861 | dfprintk(MOUNT, "--> nfs4_try_mount()\n"); |
2862 | 2862 | ||
2863 | mount_info->fill_super = nfs4_fill_super; | ||
2864 | |||
2863 | export_path = data->nfs_server.export_path; | 2865 | export_path = data->nfs_server.export_path; |
2864 | data->nfs_server.export_path = "/"; | 2866 | data->nfs_server.export_path = "/"; |
2865 | root_mnt = nfs_do_root_mount(&nfs4_remote_fs_type, flags, mount_info, | 2867 | root_mnt = nfs_do_root_mount(&nfs4_remote_fs_type, flags, mount_info, |