aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-02 12:28:37 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-02 12:28:37 -0400
commit63580e51bb3e7ec459501165884e5f815a7a9322 (patch)
tree2130de984dda95996bc7922734feb465a13fca70 /arch/parisc
parent7747bd4bceb3079572695d3942294a6c7b265557 (diff)
parentac6614b76478e68173ccf7ad4e9e98035cc9c21d (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull VFS patches (part 1) from Al Viro: "The major change in this pile is ->readdir() replacement with ->iterate(), dealing with ->f_pos races in ->readdir() instances for good. There's a lot more, but I'd prefer to split the pull request into several stages and this is the first obvious cutoff point." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (67 commits) [readdir] constify ->actor [readdir] ->readdir() is gone [readdir] convert ecryptfs [readdir] convert coda [readdir] convert ocfs2 [readdir] convert fatfs [readdir] convert xfs [readdir] convert btrfs [readdir] convert hostfs [readdir] convert afs [readdir] convert ncpfs [readdir] convert hfsplus [readdir] convert hfs [readdir] convert befs [readdir] convert cifs [readdir] convert freevxfs [readdir] convert fuse [readdir] convert hpfs reiserfs: switch reiserfs_readdir_dentry to inode reiserfs: is_privroot_deh() needs only directory inode, actually ...
Diffstat (limited to 'arch/parisc')
-rw-r--r--arch/parisc/hpux/fs.c16
-rw-r--r--arch/parisc/include/asm/pgtable.h3
2 files changed, 8 insertions, 11 deletions
diff --git a/arch/parisc/hpux/fs.c b/arch/parisc/hpux/fs.c
index 838b479a42c4..88d0962de65a 100644
--- a/arch/parisc/hpux/fs.c
+++ b/arch/parisc/hpux/fs.c
@@ -60,6 +60,7 @@ struct hpux_dirent {
60}; 60};
61 61
62struct getdents_callback { 62struct getdents_callback {
63 struct dir_context ctx;
63 struct hpux_dirent __user *current_dir; 64 struct hpux_dirent __user *current_dir;
64 struct hpux_dirent __user *previous; 65 struct hpux_dirent __user *previous;
65 int count; 66 int count;
@@ -110,24 +111,23 @@ int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned i
110{ 111{
111 struct fd arg; 112 struct fd arg;
112 struct hpux_dirent __user * lastdirent; 113 struct hpux_dirent __user * lastdirent;
113 struct getdents_callback buf; 114 struct getdents_callback buf = {
115 .ctx.actor = filldir,
116 .current_dir = dirent,
117 .count = count
118 };
114 int error; 119 int error;
115 120
116 arg = fdget(fd); 121 arg = fdget(fd);
117 if (!arg.file) 122 if (!arg.file)
118 return -EBADF; 123 return -EBADF;
119 124
120 buf.current_dir = dirent; 125 error = iterate_dir(arg.file, &buf.ctx);
121 buf.previous = NULL;
122 buf.count = count;
123 buf.error = 0;
124
125 error = vfs_readdir(arg.file, filldir, &buf);
126 if (error >= 0) 126 if (error >= 0)
127 error = buf.error; 127 error = buf.error;
128 lastdirent = buf.previous; 128 lastdirent = buf.previous;
129 if (lastdirent) { 129 if (lastdirent) {
130 if (put_user(arg.file->f_pos, &lastdirent->d_off)) 130 if (put_user(buf.ctx.pos, &lastdirent->d_off))
131 error = -EFAULT; 131 error = -EFAULT;
132 else 132 else
133 error = count - buf.count; 133 error = count - buf.count;
diff --git a/arch/parisc/include/asm/pgtable.h b/arch/parisc/include/asm/pgtable.h
index 1e40d7f86be3..34899b5d959a 100644
--- a/arch/parisc/include/asm/pgtable.h
+++ b/arch/parisc/include/asm/pgtable.h
@@ -506,9 +506,6 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr,
506#endif 506#endif
507 507
508 508
509#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \
510 remap_pfn_range(vma, vaddr, pfn, size, prot)
511
512#define pgprot_noncached(prot) __pgprot(pgprot_val(prot) | _PAGE_NO_CACHE) 509#define pgprot_noncached(prot) __pgprot(pgprot_val(prot) | _PAGE_NO_CACHE)
513 510
514/* We provide our own get_unmapped_area to provide cache coherency */ 511/* We provide our own get_unmapped_area to provide cache coherency */