aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/9p/v9fs_vfs.h1
-rw-r--r--fs/9p/vfs_file.c4
-rw-r--r--fs/aio.c1
-rw-r--r--fs/nfsd/nfs3xdr.c6
-rw-r--r--fs/nfsd/nfs4acl.c2
-rw-r--r--fs/nfsd/nfs4state.c6
-rw-r--r--fs/proc/Makefile3
-rw-r--r--fs/splice.c84
8 files changed, 26 insertions, 81 deletions
diff --git a/fs/9p/v9fs_vfs.h b/fs/9p/v9fs_vfs.h
index 8ada4c5c5d70..6a82d39dc498 100644
--- a/fs/9p/v9fs_vfs.h
+++ b/fs/9p/v9fs_vfs.h
@@ -40,7 +40,6 @@
40extern struct file_system_type v9fs_fs_type; 40extern struct file_system_type v9fs_fs_type;
41extern const struct address_space_operations v9fs_addr_operations; 41extern const struct address_space_operations v9fs_addr_operations;
42extern const struct file_operations v9fs_file_operations; 42extern const struct file_operations v9fs_file_operations;
43extern const struct file_operations v9fs_cached_file_operations;
44extern const struct file_operations v9fs_dir_operations; 43extern const struct file_operations v9fs_dir_operations;
45extern struct dentry_operations v9fs_dentry_operations; 44extern struct dentry_operations v9fs_dentry_operations;
46extern struct dentry_operations v9fs_cached_dentry_operations; 45extern struct dentry_operations v9fs_cached_dentry_operations;
diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c
index 653dfa5b2531..c7b677253843 100644
--- a/fs/9p/vfs_file.c
+++ b/fs/9p/vfs_file.c
@@ -42,6 +42,8 @@
42#include "v9fs_vfs.h" 42#include "v9fs_vfs.h"
43#include "fid.h" 43#include "fid.h"
44 44
45static const struct file_operations v9fs_cached_file_operations;
46
45/** 47/**
46 * v9fs_file_open - open a file (or directory) 48 * v9fs_file_open - open a file (or directory)
47 * @inode: inode to be opened 49 * @inode: inode to be opened
@@ -245,7 +247,7 @@ v9fs_file_write(struct file *filp, const char __user * data,
245 return total; 247 return total;
246} 248}
247 249
248const struct file_operations v9fs_cached_file_operations = { 250static const struct file_operations v9fs_cached_file_operations = {
249 .llseek = generic_file_llseek, 251 .llseek = generic_file_llseek,
250 .read = do_sync_read, 252 .read = do_sync_read,
251 .aio_read = generic_file_aio_read, 253 .aio_read = generic_file_aio_read,
diff --git a/fs/aio.c b/fs/aio.c
index 0b4ee0a5c83e..e4598d6d49dd 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -136,7 +136,6 @@ static int aio_setup_ring(struct kioctx *ctx)
136 0); 136 0);
137 if (IS_ERR((void *)info->mmap_base)) { 137 if (IS_ERR((void *)info->mmap_base)) {
138 up_write(&ctx->mm->mmap_sem); 138 up_write(&ctx->mm->mmap_sem);
139 printk("mmap err: %ld\n", -info->mmap_base);
140 info->mmap_size = 0; 139 info->mmap_size = 0;
141 aio_free_ring(ctx); 140 aio_free_ring(ctx);
142 return -EAGAIN; 141 return -EAGAIN;
diff --git a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c
index 6f677988c71d..7e4bb0af24d7 100644
--- a/fs/nfsd/nfs3xdr.c
+++ b/fs/nfsd/nfs3xdr.c
@@ -859,8 +859,8 @@ compose_entry_fh(struct nfsd3_readdirres *cd, struct svc_fh *fhp,
859#define NFS3_ENTRY_BAGGAGE (2 + 1 + 2 + 1) 859#define NFS3_ENTRY_BAGGAGE (2 + 1 + 2 + 1)
860#define NFS3_ENTRYPLUS_BAGGAGE (1 + 21 + 1 + (NFS3_FHSIZE >> 2)) 860#define NFS3_ENTRYPLUS_BAGGAGE (1 + 21 + 1 + (NFS3_FHSIZE >> 2))
861static int 861static int
862encode_entry(struct readdir_cd *ccd, const char *name, 862encode_entry(struct readdir_cd *ccd, const char *name, int namlen,
863 int namlen, off_t offset, ino_t ino, unsigned int d_type, int plus) 863 loff_t offset, ino_t ino, unsigned int d_type, int plus)
864{ 864{
865 struct nfsd3_readdirres *cd = container_of(ccd, struct nfsd3_readdirres, 865 struct nfsd3_readdirres *cd = container_of(ccd, struct nfsd3_readdirres,
866 common); 866 common);
@@ -880,7 +880,7 @@ encode_entry(struct readdir_cd *ccd, const char *name,
880 *cd->offset1 = htonl(offset64 & 0xffffffff); 880 *cd->offset1 = htonl(offset64 & 0xffffffff);
881 cd->offset1 = NULL; 881 cd->offset1 = NULL;
882 } else { 882 } else {
883 xdr_encode_hyper(cd->offset, (u64) offset); 883 xdr_encode_hyper(cd->offset, offset64);
884 } 884 }
885 } 885 }
886 886
diff --git a/fs/nfsd/nfs4acl.c b/fs/nfsd/nfs4acl.c
index 832673b14587..673a53c014a3 100644
--- a/fs/nfsd/nfs4acl.c
+++ b/fs/nfsd/nfs4acl.c
@@ -228,7 +228,7 @@ _posix_to_nfsv4_one(struct posix_acl *pacl, struct nfs4_acl *acl,
228 struct posix_acl_summary pas; 228 struct posix_acl_summary pas;
229 unsigned short deny; 229 unsigned short deny;
230 int eflag = ((flags & NFS4_ACL_TYPE_DEFAULT) ? 230 int eflag = ((flags & NFS4_ACL_TYPE_DEFAULT) ?
231 NFS4_INHERITANCE_FLAGS : 0); 231 NFS4_INHERITANCE_FLAGS | NFS4_ACE_INHERIT_ONLY_ACE : 0);
232 232
233 BUG_ON(pacl->a_count < 3); 233 BUG_ON(pacl->a_count < 3);
234 summarize_posix_acl(pacl, &pas); 234 summarize_posix_acl(pacl, &pas);
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 9e4067999209..af360705e551 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -750,9 +750,8 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
750 status = nfserr_clid_inuse; 750 status = nfserr_clid_inuse;
751 if (!cmp_creds(&conf->cl_cred, &rqstp->rq_cred) 751 if (!cmp_creds(&conf->cl_cred, &rqstp->rq_cred)
752 || conf->cl_addr != sin->sin_addr.s_addr) { 752 || conf->cl_addr != sin->sin_addr.s_addr) {
753 printk("NFSD: setclientid: string in use by client" 753 dprintk("NFSD: setclientid: string in use by client"
754 "(clientid %08x/%08x)\n", 754 "at %u.%u.%u.%u\n", NIPQUAD(conf->cl_addr));
755 conf->cl_clientid.cl_boot, conf->cl_clientid.cl_id);
756 goto out; 755 goto out;
757 } 756 }
758 } 757 }
@@ -3261,7 +3260,6 @@ __nfs4_state_shutdown(void)
3261 unhash_delegation(dp); 3260 unhash_delegation(dp);
3262 } 3261 }
3263 3262
3264 cancel_delayed_work(&laundromat_work);
3265 nfsd4_shutdown_recdir(); 3263 nfsd4_shutdown_recdir();
3266 nfs4_init = 0; 3264 nfs4_init = 0;
3267} 3265}
diff --git a/fs/proc/Makefile b/fs/proc/Makefile
index a6b3a8f878f0..bce38e3f06cb 100644
--- a/fs/proc/Makefile
+++ b/fs/proc/Makefile
@@ -8,8 +8,9 @@ proc-y := nommu.o task_nommu.o
8proc-$(CONFIG_MMU) := mmu.o task_mmu.o 8proc-$(CONFIG_MMU) := mmu.o task_mmu.o
9 9
10proc-y += inode.o root.o base.o generic.o array.o \ 10proc-y += inode.o root.o base.o generic.o array.o \
11 proc_tty.o proc_misc.o proc_sysctl.o 11 proc_tty.o proc_misc.o
12 12
13proc-$(CONFIG_PROC_SYSCTL) += proc_sysctl.o
13proc-$(CONFIG_PROC_KCORE) += kcore.o 14proc-$(CONFIG_PROC_KCORE) += kcore.o
14proc-$(CONFIG_PROC_VMCORE) += vmcore.o 15proc-$(CONFIG_PROC_VMCORE) += vmcore.o
15proc-$(CONFIG_PROC_DEVICETREE) += proc_devtree.o 16proc-$(CONFIG_PROC_DEVICETREE) += proc_devtree.o
diff --git a/fs/splice.c b/fs/splice.c
index 2fca6ebf4cc2..07f6556add0a 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -576,76 +576,21 @@ static int pipe_to_file(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
576 if (this_len + offset > PAGE_CACHE_SIZE) 576 if (this_len + offset > PAGE_CACHE_SIZE)
577 this_len = PAGE_CACHE_SIZE - offset; 577 this_len = PAGE_CACHE_SIZE - offset;
578 578
579 /*
580 * Reuse buf page, if SPLICE_F_MOVE is set and we are doing a full
581 * page.
582 */
583 if ((sd->flags & SPLICE_F_MOVE) && this_len == PAGE_CACHE_SIZE) {
584 /*
585 * If steal succeeds, buf->page is now pruned from the
586 * pagecache and we can reuse it. The page will also be
587 * locked on successful return.
588 */
589 if (buf->ops->steal(pipe, buf))
590 goto find_page;
591
592 page = buf->page;
593 if (add_to_page_cache(page, mapping, index, GFP_KERNEL)) {
594 unlock_page(page);
595 goto find_page;
596 }
597
598 page_cache_get(page);
599
600 if (!(buf->flags & PIPE_BUF_FLAG_LRU))
601 lru_cache_add(page);
602 } else {
603find_page: 579find_page:
604 page = find_lock_page(mapping, index); 580 page = find_lock_page(mapping, index);
605 if (!page) { 581 if (!page) {
606 ret = -ENOMEM; 582 ret = -ENOMEM;
607 page = page_cache_alloc_cold(mapping); 583 page = page_cache_alloc_cold(mapping);
608 if (unlikely(!page)) 584 if (unlikely(!page))
609 goto out_ret; 585 goto out_ret;
610
611 /*
612 * This will also lock the page
613 */
614 ret = add_to_page_cache_lru(page, mapping, index,
615 GFP_KERNEL);
616 if (unlikely(ret))
617 goto out;
618 }
619 586
620 /* 587 /*
621 * We get here with the page locked. If the page is also 588 * This will also lock the page
622 * uptodate, we don't need to do more. If it isn't, we
623 * may need to bring it in if we are not going to overwrite
624 * the full page.
625 */ 589 */
626 if (!PageUptodate(page)) { 590 ret = add_to_page_cache_lru(page, mapping, index,
627 if (this_len < PAGE_CACHE_SIZE) { 591 GFP_KERNEL);
628 ret = mapping->a_ops->readpage(file, page); 592 if (unlikely(ret))
629 if (unlikely(ret)) 593 goto out;
630 goto out;
631
632 lock_page(page);
633
634 if (!PageUptodate(page)) {
635 /*
636 * Page got invalidated, repeat.
637 */
638 if (!page->mapping) {
639 unlock_page(page);
640 page_cache_release(page);
641 goto find_page;
642 }
643 ret = -EIO;
644 goto out;
645 }
646 } else
647 SetPageUptodate(page);
648 }
649 } 594 }
650 595
651 ret = mapping->a_ops->prepare_write(file, page, offset, offset+this_len); 596 ret = mapping->a_ops->prepare_write(file, page, offset, offset+this_len);
@@ -706,9 +651,9 @@ out_ret:
706 * key here is the 'actor' worker passed in that actually moves the data 651 * key here is the 'actor' worker passed in that actually moves the data
707 * to the wanted destination. See pipe_to_file/pipe_to_sendpage above. 652 * to the wanted destination. See pipe_to_file/pipe_to_sendpage above.
708 */ 653 */
709static ssize_t __splice_from_pipe(struct pipe_inode_info *pipe, 654ssize_t __splice_from_pipe(struct pipe_inode_info *pipe,
710 struct file *out, loff_t *ppos, size_t len, 655 struct file *out, loff_t *ppos, size_t len,
711 unsigned int flags, splice_actor *actor) 656 unsigned int flags, splice_actor *actor)
712{ 657{
713 int ret, do_wakeup, err; 658 int ret, do_wakeup, err;
714 struct splice_desc sd; 659 struct splice_desc sd;
@@ -802,6 +747,7 @@ static ssize_t __splice_from_pipe(struct pipe_inode_info *pipe,
802 747
803 return ret; 748 return ret;
804} 749}
750EXPORT_SYMBOL(__splice_from_pipe);
805 751
806ssize_t splice_from_pipe(struct pipe_inode_info *pipe, struct file *out, 752ssize_t splice_from_pipe(struct pipe_inode_info *pipe, struct file *out,
807 loff_t *ppos, size_t len, unsigned int flags, 753 loff_t *ppos, size_t len, unsigned int flags,