Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57743
b: refs/heads/master
c: ea74342
h: refs/heads/master
i:
  57741: 3e85d82
  57739: f7fa2e0
  57735: 6fb239e
  57727: c06840c
v: v3
  • Loading branch information
Milind Arun Choudhary authored and Kyle McMartin committed May 23, 2007
1 parent 87cbcd9 commit a32464f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7022672e4046fac4699aa5f8ff2a5213b7ec4ff9
refs/heads/master: ea74342900dbe79f2a31ed3609b9e2bdb5c7198c
5 changes: 2 additions & 3 deletions trunk/arch/parisc/hpux/fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/sched.h>
#include <linux/file.h>
Expand Down Expand Up @@ -69,15 +70,14 @@ struct getdents_callback {
};

#define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de)))
#define ROUND_UP(x) (((x)+sizeof(long)-1) & ~(sizeof(long)-1))

static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
u64 ino, unsigned d_type)
{
struct hpux_dirent __user * dirent;
struct getdents_callback * buf = (struct getdents_callback *) __buf;
ino_t d_ino;
int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1);
int reclen = ALIGN(NAME_OFFSET(dirent) + namlen + 1, sizeof(long));

buf->error = -EINVAL; /* only used if we fail.. */
if (reclen > buf->count)
Expand All @@ -102,7 +102,6 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
}

#undef NAME_OFFSET
#undef ROUND_UP

int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned int count)
{
Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/parisc/kernel/sys_parisc32.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,14 +311,13 @@ struct readdir32_callback {
int count;
};

#define ROUND_UP(x,a) ((__typeof__(x))(((unsigned long)(x) + ((a) - 1)) & ~((a) - 1)))
#define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de)))
static int filldir32 (void *__buf, const char *name, int namlen,
loff_t offset, u64 ino, unsigned int d_type)
{
struct linux32_dirent __user * dirent;
struct getdents32_callback * buf = (struct getdents32_callback *) __buf;
int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1, 4);
int reclen = ALIGN(NAME_OFFSET(dirent) + namlen + 1, 4);
u32 d_ino;

buf->error = -EINVAL; /* only used if we fail.. */
Expand Down

0 comments on commit a32464f

Please sign in to comment.