diff options
Diffstat (limited to 'fs/nfs')
| -rw-r--r-- | fs/nfs/fscache.c | 10 | ||||
| -rw-r--r-- | fs/nfs/sysctl.c | 22 | ||||
| -rw-r--r-- | fs/nfs/write.c | 2 |
3 files changed, 11 insertions, 23 deletions
diff --git a/fs/nfs/fscache.c b/fs/nfs/fscache.c index 70fad69eb959..fa588006588d 100644 --- a/fs/nfs/fscache.c +++ b/fs/nfs/fscache.c | |||
| @@ -359,17 +359,13 @@ int nfs_fscache_release_page(struct page *page, gfp_t gfp) | |||
| 359 | 359 | ||
| 360 | BUG_ON(!cookie); | 360 | BUG_ON(!cookie); |
| 361 | 361 | ||
| 362 | if (fscache_check_page_write(cookie, page)) { | ||
| 363 | if (!(gfp & __GFP_WAIT)) | ||
| 364 | return 0; | ||
| 365 | fscache_wait_on_page_write(cookie, page); | ||
| 366 | } | ||
| 367 | |||
| 368 | if (PageFsCache(page)) { | 362 | if (PageFsCache(page)) { |
| 369 | dfprintk(FSCACHE, "NFS: fscache releasepage (0x%p/0x%p/0x%p)\n", | 363 | dfprintk(FSCACHE, "NFS: fscache releasepage (0x%p/0x%p/0x%p)\n", |
| 370 | cookie, page, nfsi); | 364 | cookie, page, nfsi); |
| 371 | 365 | ||
| 372 | fscache_uncache_page(cookie, page); | 366 | if (!fscache_maybe_release_page(cookie, page, gfp)) |
| 367 | return 0; | ||
| 368 | |||
| 373 | nfs_add_fscache_stats(page->mapping->host, | 369 | nfs_add_fscache_stats(page->mapping->host, |
| 374 | NFSIOS_FSCACHE_PAGES_UNCACHED, 1); | 370 | NFSIOS_FSCACHE_PAGES_UNCACHED, 1); |
| 375 | } | 371 | } |
diff --git a/fs/nfs/sysctl.c b/fs/nfs/sysctl.c index b62481dabae9..70e1fbbaaeab 100644 --- a/fs/nfs/sysctl.c +++ b/fs/nfs/sysctl.c | |||
| @@ -22,63 +22,55 @@ static struct ctl_table_header *nfs_callback_sysctl_table; | |||
| 22 | static ctl_table nfs_cb_sysctls[] = { | 22 | static ctl_table nfs_cb_sysctls[] = { |
| 23 | #ifdef CONFIG_NFS_V4 | 23 | #ifdef CONFIG_NFS_V4 |
| 24 | { | 24 | { |
| 25 | .ctl_name = CTL_UNNUMBERED, | ||
| 26 | .procname = "nfs_callback_tcpport", | 25 | .procname = "nfs_callback_tcpport", |
| 27 | .data = &nfs_callback_set_tcpport, | 26 | .data = &nfs_callback_set_tcpport, |
| 28 | .maxlen = sizeof(int), | 27 | .maxlen = sizeof(int), |
| 29 | .mode = 0644, | 28 | .mode = 0644, |
| 30 | .proc_handler = &proc_dointvec_minmax, | 29 | .proc_handler = proc_dointvec_minmax, |
| 31 | .extra1 = (int *)&nfs_set_port_min, | 30 | .extra1 = (int *)&nfs_set_port_min, |
| 32 | .extra2 = (int *)&nfs_set_port_max, | 31 | .extra2 = (int *)&nfs_set_port_max, |
| 33 | }, | 32 | }, |
| 34 | { | 33 | { |
| 35 | .ctl_name = CTL_UNNUMBERED, | ||
| 36 | .procname = "idmap_cache_timeout", | 34 | .procname = "idmap_cache_timeout", |
| 37 | .data = &nfs_idmap_cache_timeout, | 35 | .data = &nfs_idmap_cache_timeout, |
| 38 | .maxlen = sizeof(int), | 36 | .maxlen = sizeof(int), |
| 39 | .mode = 0644, | 37 | .mode = 0644, |
| 40 | .proc_handler = &proc_dointvec_jiffies, | 38 | .proc_handler = proc_dointvec_jiffies, |
| 41 | .strategy = &sysctl_jiffies, | ||
| 42 | }, | 39 | }, |
| 43 | #endif | 40 | #endif |
| 44 | { | 41 | { |
| 45 | .ctl_name = CTL_UNNUMBERED, | ||
| 46 | .procname = "nfs_mountpoint_timeout", | 42 | .procname = "nfs_mountpoint_timeout", |
| 47 | .data = &nfs_mountpoint_expiry_timeout, | 43 | .data = &nfs_mountpoint_expiry_timeout, |
| 48 | .maxlen = sizeof(nfs_mountpoint_expiry_timeout), | 44 | .maxlen = sizeof(nfs_mountpoint_expiry_timeout), |
| 49 | .mode = 0644, | 45 | .mode = 0644, |
| 50 | .proc_handler = &proc_dointvec_jiffies, | 46 | .proc_handler = proc_dointvec_jiffies, |
| 51 | .strategy = &sysctl_jiffies, | ||
| 52 | }, | 47 | }, |
| 53 | { | 48 | { |
| 54 | .ctl_name = CTL_UNNUMBERED, | ||
| 55 | .procname = "nfs_congestion_kb", | 49 | .procname = "nfs_congestion_kb", |
| 56 | .data = &nfs_congestion_kb, | 50 | .data = &nfs_congestion_kb, |
| 57 | .maxlen = sizeof(nfs_congestion_kb), | 51 | .maxlen = sizeof(nfs_congestion_kb), |
| 58 | .mode = 0644, | 52 | .mode = 0644, |
| 59 | .proc_handler = &proc_dointvec, | 53 | .proc_handler = proc_dointvec, |
| 60 | }, | 54 | }, |
| 61 | { .ctl_name = 0 } | 55 | { } |
| 62 | }; | 56 | }; |
| 63 | 57 | ||
| 64 | static ctl_table nfs_cb_sysctl_dir[] = { | 58 | static ctl_table nfs_cb_sysctl_dir[] = { |
| 65 | { | 59 | { |
| 66 | .ctl_name = CTL_UNNUMBERED, | ||
| 67 | .procname = "nfs", | 60 | .procname = "nfs", |
| 68 | .mode = 0555, | 61 | .mode = 0555, |
| 69 | .child = nfs_cb_sysctls, | 62 | .child = nfs_cb_sysctls, |
| 70 | }, | 63 | }, |
| 71 | { .ctl_name = 0 } | 64 | { } |
| 72 | }; | 65 | }; |
| 73 | 66 | ||
| 74 | static ctl_table nfs_cb_sysctl_root[] = { | 67 | static ctl_table nfs_cb_sysctl_root[] = { |
| 75 | { | 68 | { |
| 76 | .ctl_name = CTL_FS, | ||
| 77 | .procname = "fs", | 69 | .procname = "fs", |
| 78 | .mode = 0555, | 70 | .mode = 0555, |
| 79 | .child = nfs_cb_sysctl_dir, | 71 | .child = nfs_cb_sysctl_dir, |
| 80 | }, | 72 | }, |
| 81 | { .ctl_name = 0 } | 73 | { } |
| 82 | }; | 74 | }; |
| 83 | 75 | ||
| 84 | int nfs_register_sysctl(void) | 76 | int nfs_register_sysctl(void) |
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 53eb26c16b50..c84b5cc1a943 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
| @@ -178,7 +178,7 @@ static int wb_priority(struct writeback_control *wbc) | |||
| 178 | { | 178 | { |
| 179 | if (wbc->for_reclaim) | 179 | if (wbc->for_reclaim) |
| 180 | return FLUSH_HIGHPRI | FLUSH_STABLE; | 180 | return FLUSH_HIGHPRI | FLUSH_STABLE; |
| 181 | if (wbc->for_kupdate) | 181 | if (wbc->for_kupdate || wbc->for_background) |
| 182 | return FLUSH_LOWPRI; | 182 | return FLUSH_LOWPRI; |
| 183 | return 0; | 183 | return 0; |
| 184 | } | 184 | } |
