diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 20:12:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 20:12:13 -0400 |
commit | 7f0ef0267e20d62d45d527911a993b1e998f4968 (patch) | |
tree | de51abc7da5903f59d83e23937f22420164c9477 /fs/nfs | |
parent | 862f0012549110d6f2586bf54b52ed4540cbff3a (diff) | |
parent | 9307c29524502c21f0e8a6d96d850b2f5bc0bd9a (diff) |
Merge branch 'akpm' (updates from Andrew Morton)
Merge first patch-bomb from Andrew Morton:
- various misc bits
- I'm been patchmonkeying ocfs2 for a while, as Joel and Mark have been
distracted. There has been quite a bit of activity.
- About half the MM queue
- Some backlight bits
- Various lib/ updates
- checkpatch updates
- zillions more little rtc patches
- ptrace
- signals
- exec
- procfs
- rapidio
- nbd
- aoe
- pps
- memstick
- tools/testing/selftests updates
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (445 commits)
tools/testing/selftests: don't assume the x bit is set on scripts
selftests: add .gitignore for kcmp
selftests: fix clean target in kcmp Makefile
selftests: add .gitignore for vm
selftests: add hugetlbfstest
self-test: fix make clean
selftests: exit 1 on failure
kernel/resource.c: remove the unneeded assignment in function __find_resource
aio: fix wrong comment in aio_complete()
drivers/w1/slaves/w1_ds2408.c: add magic sequence to disable P0 test mode
drivers/memstick/host/r592.c: convert to module_pci_driver
drivers/memstick/host/jmb38x_ms: convert to module_pci_driver
pps-gpio: add device-tree binding and support
drivers/pps/clients/pps-gpio.c: convert to module_platform_driver
drivers/pps/clients/pps-gpio.c: convert to devm_* helpers
drivers/parport/share.c: use kzalloc
Documentation/accounting/getdelays.c: avoid strncpy in accounting tool
aoe: update internal version number to v83
aoe: update copyright date
aoe: perform I/O completions in parallel
...
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/callback.c | 5 | ||||
-rw-r--r-- | fs/nfs/dir.c | 7 | ||||
-rw-r--r-- | fs/nfs/file.c | 30 | ||||
-rw-r--r-- | fs/nfs/nfs4state.c | 2 |
4 files changed, 35 insertions, 9 deletions
diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index cff089a412c7..da6a43d19aa3 100644 --- a/fs/nfs/callback.c +++ b/fs/nfs/callback.c | |||
@@ -211,7 +211,6 @@ static int nfs_callback_start_svc(int minorversion, struct rpc_xprt *xprt, | |||
211 | struct svc_rqst *rqstp; | 211 | struct svc_rqst *rqstp; |
212 | int (*callback_svc)(void *vrqstp); | 212 | int (*callback_svc)(void *vrqstp); |
213 | struct nfs_callback_data *cb_info = &nfs_callback_info[minorversion]; | 213 | struct nfs_callback_data *cb_info = &nfs_callback_info[minorversion]; |
214 | char svc_name[12]; | ||
215 | int ret; | 214 | int ret; |
216 | 215 | ||
217 | nfs_callback_bc_serv(minorversion, xprt, serv); | 216 | nfs_callback_bc_serv(minorversion, xprt, serv); |
@@ -235,10 +234,10 @@ static int nfs_callback_start_svc(int minorversion, struct rpc_xprt *xprt, | |||
235 | 234 | ||
236 | svc_sock_update_bufs(serv); | 235 | svc_sock_update_bufs(serv); |
237 | 236 | ||
238 | sprintf(svc_name, "nfsv4.%u-svc", minorversion); | ||
239 | cb_info->serv = serv; | 237 | cb_info->serv = serv; |
240 | cb_info->rqst = rqstp; | 238 | cb_info->rqst = rqstp; |
241 | cb_info->task = kthread_run(callback_svc, cb_info->rqst, svc_name); | 239 | cb_info->task = kthread_run(callback_svc, cb_info->rqst, |
240 | "nfsv4.%u-svc", minorversion); | ||
242 | if (IS_ERR(cb_info->task)) { | 241 | if (IS_ERR(cb_info->task)) { |
243 | ret = PTR_ERR(cb_info->task); | 242 | ret = PTR_ERR(cb_info->task); |
244 | svc_exit_thread(cb_info->rqst); | 243 | svc_exit_thread(cb_info->rqst); |
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 5d051419527b..d7ed697133f0 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/pagevec.h> | 33 | #include <linux/pagevec.h> |
34 | #include <linux/namei.h> | 34 | #include <linux/namei.h> |
35 | #include <linux/mount.h> | 35 | #include <linux/mount.h> |
36 | #include <linux/swap.h> | ||
36 | #include <linux/sched.h> | 37 | #include <linux/sched.h> |
37 | #include <linux/kmemleak.h> | 38 | #include <linux/kmemleak.h> |
38 | #include <linux/xattr.h> | 39 | #include <linux/xattr.h> |
@@ -1758,7 +1759,6 @@ EXPORT_SYMBOL_GPL(nfs_unlink); | |||
1758 | */ | 1759 | */ |
1759 | int nfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname) | 1760 | int nfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname) |
1760 | { | 1761 | { |
1761 | struct pagevec lru_pvec; | ||
1762 | struct page *page; | 1762 | struct page *page; |
1763 | char *kaddr; | 1763 | char *kaddr; |
1764 | struct iattr attr; | 1764 | struct iattr attr; |
@@ -1798,11 +1798,8 @@ int nfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname) | |||
1798 | * No big deal if we can't add this page to the page cache here. | 1798 | * No big deal if we can't add this page to the page cache here. |
1799 | * READLINK will get the missing page from the server if needed. | 1799 | * READLINK will get the missing page from the server if needed. |
1800 | */ | 1800 | */ |
1801 | pagevec_init(&lru_pvec, 0); | 1801 | if (!add_to_page_cache_lru(page, dentry->d_inode->i_mapping, 0, |
1802 | if (!add_to_page_cache(page, dentry->d_inode->i_mapping, 0, | ||
1803 | GFP_KERNEL)) { | 1802 | GFP_KERNEL)) { |
1804 | pagevec_add(&lru_pvec, page); | ||
1805 | pagevec_lru_add_file(&lru_pvec); | ||
1806 | SetPageUptodate(page); | 1803 | SetPageUptodate(page); |
1807 | unlock_page(page); | 1804 | unlock_page(page); |
1808 | } else | 1805 | } else |
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 6b4a79f4ad1d..94e94bd11aae 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c | |||
@@ -495,6 +495,35 @@ static int nfs_release_page(struct page *page, gfp_t gfp) | |||
495 | return nfs_fscache_release_page(page, gfp); | 495 | return nfs_fscache_release_page(page, gfp); |
496 | } | 496 | } |
497 | 497 | ||
498 | static void nfs_check_dirty_writeback(struct page *page, | ||
499 | bool *dirty, bool *writeback) | ||
500 | { | ||
501 | struct nfs_inode *nfsi; | ||
502 | struct address_space *mapping = page_file_mapping(page); | ||
503 | |||
504 | if (!mapping || PageSwapCache(page)) | ||
505 | return; | ||
506 | |||
507 | /* | ||
508 | * Check if an unstable page is currently being committed and | ||
509 | * if so, have the VM treat it as if the page is under writeback | ||
510 | * so it will not block due to pages that will shortly be freeable. | ||
511 | */ | ||
512 | nfsi = NFS_I(mapping->host); | ||
513 | if (test_bit(NFS_INO_COMMIT, &nfsi->flags)) { | ||
514 | *writeback = true; | ||
515 | return; | ||
516 | } | ||
517 | |||
518 | /* | ||
519 | * If PagePrivate() is set, then the page is not freeable and as the | ||
520 | * inode is not being committed, it's not going to be cleaned in the | ||
521 | * near future so treat it as dirty | ||
522 | */ | ||
523 | if (PagePrivate(page)) | ||
524 | *dirty = true; | ||
525 | } | ||
526 | |||
498 | /* | 527 | /* |
499 | * Attempt to clear the private state associated with a page when an error | 528 | * Attempt to clear the private state associated with a page when an error |
500 | * occurs that requires the cached contents of an inode to be written back or | 529 | * occurs that requires the cached contents of an inode to be written back or |
@@ -542,6 +571,7 @@ const struct address_space_operations nfs_file_aops = { | |||
542 | .direct_IO = nfs_direct_IO, | 571 | .direct_IO = nfs_direct_IO, |
543 | .migratepage = nfs_migrate_page, | 572 | .migratepage = nfs_migrate_page, |
544 | .launder_page = nfs_launder_page, | 573 | .launder_page = nfs_launder_page, |
574 | .is_dirty_writeback = nfs_check_dirty_writeback, | ||
545 | .error_remove_page = generic_error_remove_page, | 575 | .error_remove_page = generic_error_remove_page, |
546 | #ifdef CONFIG_NFS_SWAP | 576 | #ifdef CONFIG_NFS_SWAP |
547 | .swap_activate = nfs_swap_activate, | 577 | .swap_activate = nfs_swap_activate, |
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index ff10b4aa534c..55418811a55a 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c | |||
@@ -1194,7 +1194,7 @@ void nfs4_schedule_state_manager(struct nfs_client *clp) | |||
1194 | snprintf(buf, sizeof(buf), "%s-manager", | 1194 | snprintf(buf, sizeof(buf), "%s-manager", |
1195 | rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_ADDR)); | 1195 | rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_ADDR)); |
1196 | rcu_read_unlock(); | 1196 | rcu_read_unlock(); |
1197 | task = kthread_run(nfs4_run_state_manager, clp, buf); | 1197 | task = kthread_run(nfs4_run_state_manager, clp, "%s", buf); |
1198 | if (IS_ERR(task)) { | 1198 | if (IS_ERR(task)) { |
1199 | printk(KERN_ERR "%s: kthread_run: %ld\n", | 1199 | printk(KERN_ERR "%s: kthread_run: %ld\n", |
1200 | __func__, PTR_ERR(task)); | 1200 | __func__, PTR_ERR(task)); |