Commit 1250ca4c authored by Josef Sipek's avatar Josef Sipek Committed by Linus Torvalds

[PATCH] struct path: convert sparc64

Signed-off-by: default avatarJosef Sipek <jsipek@fsl.cs.sunysb.edu>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 45e07981
...@@ -209,7 +209,7 @@ static int load_aout32_binary(struct linux_binprm * bprm, struct pt_regs * regs) ...@@ -209,7 +209,7 @@ static int load_aout32_binary(struct linux_binprm * bprm, struct pt_regs * regs)
if ((N_MAGIC(ex) != ZMAGIC && N_MAGIC(ex) != OMAGIC && if ((N_MAGIC(ex) != ZMAGIC && N_MAGIC(ex) != OMAGIC &&
N_MAGIC(ex) != QMAGIC && N_MAGIC(ex) != NMAGIC) || N_MAGIC(ex) != QMAGIC && N_MAGIC(ex) != NMAGIC) ||
N_TRSIZE(ex) || N_DRSIZE(ex) || N_TRSIZE(ex) || N_DRSIZE(ex) ||
bprm->file->f_dentry->d_inode->i_size < ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) { bprm->file->f_path.dentry->d_inode->i_size < ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) {
return -ENOEXEC; return -ENOEXEC;
} }
...@@ -349,7 +349,7 @@ static int load_aout32_library(struct file *file) ...@@ -349,7 +349,7 @@ static int load_aout32_library(struct file *file)
int retval; int retval;
struct exec ex; struct exec ex;
inode = file->f_dentry->d_inode; inode = file->f_path.dentry->d_inode;
retval = -ENOEXEC; retval = -ENOEXEC;
error = kernel_read(file, 0, (char *) &ex, sizeof(ex)); error = kernel_read(file, 0, (char *) &ex, sizeof(ex));
......
...@@ -83,7 +83,7 @@ asmlinkage u32 sunos_mmap(u32 addr, u32 len, u32 prot, u32 flags, u32 fd, u32 of ...@@ -83,7 +83,7 @@ asmlinkage u32 sunos_mmap(u32 addr, u32 len, u32 prot, u32 flags, u32 fd, u32 of
file = fget(fd); file = fget(fd);
if (!file) if (!file)
goto out; goto out;
inode = file->f_dentry->d_inode; inode = file->f_path.dentry->d_inode;
if (imajor(inode) == MEM_MAJOR && iminor(inode) == 5) { if (imajor(inode) == MEM_MAJOR && iminor(inode) == 5) {
flags |= MAP_ANONYMOUS; flags |= MAP_ANONYMOUS;
fput(file); fput(file);
...@@ -615,7 +615,7 @@ sunos_nfs_get_server_fd (int fd, struct sockaddr_in *addr) ...@@ -615,7 +615,7 @@ sunos_nfs_get_server_fd (int fd, struct sockaddr_in *addr)
if (!file) if (!file)
return 0; return 0;
inode = file->f_dentry->d_inode; inode = file->f_path.dentry->d_inode;
socket = SOCKET_I(inode); socket = SOCKET_I(inode);
local.sin_family = AF_INET; local.sin_family = AF_INET;
......
...@@ -449,7 +449,7 @@ asmlinkage int solaris_fstatvfs(unsigned int fd, u32 buf) ...@@ -449,7 +449,7 @@ asmlinkage int solaris_fstatvfs(unsigned int fd, u32 buf)
error = -EBADF; error = -EBADF;
file = fget(fd); file = fget(fd);
if (file) { if (file) {
error = report_statvfs(file->f_vfsmnt, file->f_dentry->d_inode, buf); error = report_statvfs(file->f_path.mnt, file->f_path.dentry->d_inode, buf);
fput(file); fput(file);
} }
...@@ -481,7 +481,7 @@ asmlinkage int solaris_fstatvfs64(unsigned int fd, u32 buf) ...@@ -481,7 +481,7 @@ asmlinkage int solaris_fstatvfs64(unsigned int fd, u32 buf)
file = fget(fd); file = fget(fd);
if (file) { if (file) {
lock_kernel(); lock_kernel();
error = report_statvfs64(file->f_vfsmnt, file->f_dentry->d_inode, buf); error = report_statvfs64(file->f_path.mnt, file->f_path.dentry->d_inode, buf);
unlock_kernel(); unlock_kernel();
fput(file); fput(file);
} }
......
...@@ -299,8 +299,8 @@ static inline int solaris_sockmod(unsigned int fd, unsigned int cmd, u32 arg) ...@@ -299,8 +299,8 @@ static inline int solaris_sockmod(unsigned int fd, unsigned int cmd, u32 arg)
rcu_read_lock(); rcu_read_lock();
fdt = files_fdtable(current->files); fdt = files_fdtable(current->files);
if (! fdt->fd[fd] || if (! fdt->fd[fd] ||
! fdt->fd[fd]->f_dentry || ! fdt->fd[fd]->f_path.dentry ||
! (ino = fdt->fd[fd]->f_dentry->d_inode) || ! (ino = fdt->fd[fd]->f_path.dentry->d_inode) ||
! S_ISSOCK(ino->i_mode)) { ! S_ISSOCK(ino->i_mode)) {
rcu_read_unlock(); rcu_read_unlock();
return TBADF; return TBADF;
...@@ -480,7 +480,7 @@ static inline int solaris_S(struct file *filp, unsigned int fd, unsigned int cmd ...@@ -480,7 +480,7 @@ static inline int solaris_S(struct file *filp, unsigned int fd, unsigned int cmd
struct sol_socket_struct *sock; struct sol_socket_struct *sock;
struct module_info *mi; struct module_info *mi;
ino = filp->f_dentry->d_inode; ino = filp->f_path.dentry->d_inode;
if (!S_ISSOCK(ino->i_mode)) if (!S_ISSOCK(ino->i_mode))
return -EBADF; return -EBADF;
sock = filp->private_data; sock = filp->private_data;
......
...@@ -77,7 +77,7 @@ static u32 do_solaris_mmap(u32 addr, u32 len, u32 prot, u32 flags, u32 fd, u64 o ...@@ -77,7 +77,7 @@ static u32 do_solaris_mmap(u32 addr, u32 len, u32 prot, u32 flags, u32 fd, u64 o
if (!file) if (!file)
goto out; goto out;
else { else {
struct inode * inode = file->f_dentry->d_inode; struct inode * inode = file->f_path.dentry->d_inode;
if(imajor(inode) == MEM_MAJOR && if(imajor(inode) == MEM_MAJOR &&
iminor(inode) == 5) { iminor(inode) == 5) {
flags |= MAP_ANONYMOUS; flags |= MAP_ANONYMOUS;
......
...@@ -96,13 +96,13 @@ static int socksys_open(struct inode * inode, struct file * filp) ...@@ -96,13 +96,13 @@ static int socksys_open(struct inode * inode, struct file * filp)
* No shit. WTF is it supposed to do, anyway? * No shit. WTF is it supposed to do, anyway?
* *
* Try instead: * Try instead:
* d_delete(filp->f_dentry), then d_instantiate with sock inode * d_delete(filp->f_path.dentry), then d_instantiate with sock inode
*/ */
dentry = filp->f_dentry; dentry = filp->f_path.dentry;
filp->f_dentry = dget(fcheck(fd)->f_dentry); filp->f_path.dentry = dget(fcheck(fd)->f_path.dentry);
filp->f_dentry->d_inode->i_rdev = inode->i_rdev; filp->f_path.dentry->d_inode->i_rdev = inode->i_rdev;
filp->f_dentry->d_inode->i_flock = inode->i_flock; filp->f_path.dentry->d_inode->i_flock = inode->i_flock;
SOCKET_I(filp->f_dentry->d_inode)->file = filp; SOCKET_I(filp->f_path.dentry->d_inode)->file = filp;
filp->f_op = &socksys_file_ops; filp->f_op = &socksys_file_ops;
sock = (struct sol_socket_struct*) sock = (struct sol_socket_struct*)
mykmalloc(sizeof(struct sol_socket_struct), GFP_KERNEL); mykmalloc(sizeof(struct sol_socket_struct), GFP_KERNEL);
...@@ -148,7 +148,7 @@ static unsigned int socksys_poll(struct file * filp, poll_table * wait) ...@@ -148,7 +148,7 @@ static unsigned int socksys_poll(struct file * filp, poll_table * wait)
struct inode *ino; struct inode *ino;
unsigned int mask = 0; unsigned int mask = 0;
ino=filp->f_dentry->d_inode; ino=filp->f_path.dentry->d_inode;
if (ino && S_ISSOCK(ino->i_mode)) { if (ino && S_ISSOCK(ino->i_mode)) {
struct sol_socket_struct *sock; struct sol_socket_struct *sock;
sock = (struct sol_socket_struct*)filp->private_data; sock = (struct sol_socket_struct*)filp->private_data;
......
...@@ -147,7 +147,7 @@ static void timod_wake_socket(unsigned int fd) ...@@ -147,7 +147,7 @@ static void timod_wake_socket(unsigned int fd)
SOLD("wakeing socket"); SOLD("wakeing socket");
fdt = files_fdtable(current->files); fdt = files_fdtable(current->files);
sock = SOCKET_I(fdt->fd[fd]->f_dentry->d_inode); sock = SOCKET_I(fdt->fd[fd]->f_path.dentry->d_inode);
wake_up_interruptible(&sock->wait); wake_up_interruptible(&sock->wait);
read_lock(&sock->sk->sk_callback_lock); read_lock(&sock->sk->sk_callback_lock);
if (sock->fasync_list && !test_bit(SOCK_ASYNC_WAITDATA, &sock->flags)) if (sock->fasync_list && !test_bit(SOCK_ASYNC_WAITDATA, &sock->flags))
...@@ -361,7 +361,7 @@ int timod_putmsg(unsigned int fd, char __user *ctl_buf, int ctl_len, ...@@ -361,7 +361,7 @@ int timod_putmsg(unsigned int fd, char __user *ctl_buf, int ctl_len,
fdt = files_fdtable(current->files); fdt = files_fdtable(current->files);
filp = fdt->fd[fd]; filp = fdt->fd[fd];
ino = filp->f_dentry->d_inode; ino = filp->f_path.dentry->d_inode;
sock = (struct sol_socket_struct *)filp->private_data; sock = (struct sol_socket_struct *)filp->private_data;
SOLD("entry"); SOLD("entry");
if (get_user(ret, (int __user *)A(ctl_buf))) if (get_user(ret, (int __user *)A(ctl_buf)))
...@@ -644,7 +644,7 @@ int timod_getmsg(unsigned int fd, char __user *ctl_buf, int ctl_maxlen, s32 __us ...@@ -644,7 +644,7 @@ int timod_getmsg(unsigned int fd, char __user *ctl_buf, int ctl_maxlen, s32 __us
SOLDD(("%u %p %d %p %p %d %p %d\n", fd, ctl_buf, ctl_maxlen, ctl_len, data_buf, data_maxlen, data_len, *flags_p)); SOLDD(("%u %p %d %p %p %d %p %d\n", fd, ctl_buf, ctl_maxlen, ctl_len, data_buf, data_maxlen, data_len, *flags_p));
fdt = files_fdtable(current->files); fdt = files_fdtable(current->files);
filp = fdt->fd[fd]; filp = fdt->fd[fd];
ino = filp->f_dentry->d_inode; ino = filp->f_path.dentry->d_inode;
sock = (struct sol_socket_struct *)filp->private_data; sock = (struct sol_socket_struct *)filp->private_data;
SOLDD(("%p %p\n", sock->pfirst, sock->pfirst ? sock->pfirst->next : NULL)); SOLDD(("%p %p\n", sock->pfirst, sock->pfirst ? sock->pfirst->next : NULL));
if ( ctl_maxlen > 0 && !sock->pfirst && SOCKET_I(ino)->type == SOCK_STREAM if ( ctl_maxlen > 0 && !sock->pfirst && SOCKET_I(ino)->type == SOCK_STREAM
...@@ -865,7 +865,7 @@ asmlinkage int solaris_getmsg(unsigned int fd, u32 arg1, u32 arg2, u32 arg3) ...@@ -865,7 +865,7 @@ asmlinkage int solaris_getmsg(unsigned int fd, u32 arg1, u32 arg2, u32 arg3)
filp = fdt->fd[fd]; filp = fdt->fd[fd];
if(!filp) goto out; if(!filp) goto out;
ino = filp->f_dentry->d_inode; ino = filp->f_path.dentry->d_inode;
if (!ino || !S_ISSOCK(ino->i_mode)) if (!ino || !S_ISSOCK(ino->i_mode))
goto out; goto out;
...@@ -933,7 +933,7 @@ asmlinkage int solaris_putmsg(unsigned int fd, u32 arg1, u32 arg2, u32 arg3) ...@@ -933,7 +933,7 @@ asmlinkage int solaris_putmsg(unsigned int fd, u32 arg1, u32 arg2, u32 arg3)
filp = fdt->fd[fd]; filp = fdt->fd[fd];
if(!filp) goto out; if(!filp) goto out;
ino = filp->f_dentry->d_inode; ino = filp->f_path.dentry->d_inode;
if (!ino) goto out; if (!ino) goto out;
if (!S_ISSOCK(ino->i_mode) && if (!S_ISSOCK(ino->i_mode) &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment