Commit 496ad9aa authored by Al Viro's avatar Al Viro

new helper: file_inode(file)

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 57eccb83
...@@ -111,7 +111,7 @@ static ssize_t srm_env_proc_write(struct file *file, const char __user *buffer, ...@@ -111,7 +111,7 @@ static ssize_t srm_env_proc_write(struct file *file, const char __user *buffer,
size_t count, loff_t *pos) size_t count, loff_t *pos)
{ {
int res; int res;
srm_env_t *entry = PDE(file->f_path.dentry->d_inode)->data; srm_env_t *entry = PDE(file_inode(file))->data;
char *buf = (char *) __get_free_page(GFP_USER); char *buf = (char *) __get_free_page(GFP_USER);
unsigned long ret1, ret2; unsigned long ret1, ret2;
......
...@@ -116,7 +116,7 @@ static const struct seq_operations cplbinfo_sops = { ...@@ -116,7 +116,7 @@ static const struct seq_operations cplbinfo_sops = {
static int cplbinfo_open(struct inode *inode, struct file *file) static int cplbinfo_open(struct inode *inode, struct file *file)
{ {
struct proc_dir_entry *pde = PDE(file->f_path.dentry->d_inode); struct proc_dir_entry *pde = PDE(file_inode(file));
char cplb_type; char cplb_type;
unsigned int cpu; unsigned int cpu;
int ret; int ret;
......
...@@ -654,7 +654,7 @@ static int sync_serial_release(struct inode *inode, struct file *file) ...@@ -654,7 +654,7 @@ static int sync_serial_release(struct inode *inode, struct file *file)
static unsigned int sync_serial_poll(struct file *file, poll_table *wait) static unsigned int sync_serial_poll(struct file *file, poll_table *wait)
{ {
int dev = MINOR(file->f_dentry->d_inode->i_rdev); int dev = MINOR(file_inode(file)->i_rdev);
unsigned int mask = 0; unsigned int mask = 0;
struct sync_port *port; struct sync_port *port;
DEBUGPOLL(static unsigned int prev_mask = 0); DEBUGPOLL(static unsigned int prev_mask = 0);
...@@ -685,7 +685,7 @@ static int sync_serial_ioctl_unlocked(struct file *file, ...@@ -685,7 +685,7 @@ static int sync_serial_ioctl_unlocked(struct file *file,
int return_val = 0; int return_val = 0;
unsigned long flags; unsigned long flags;
int dev = MINOR(file->f_dentry->d_inode->i_rdev); int dev = MINOR(file_inode(file)->i_rdev);
struct sync_port *port; struct sync_port *port;
if (dev < 0 || dev >= NUMBER_OF_PORTS || !ports[dev].enabled) { if (dev < 0 || dev >= NUMBER_OF_PORTS || !ports[dev].enabled) {
...@@ -973,7 +973,7 @@ static long sync_serial_ioctl(struct file *file, ...@@ -973,7 +973,7 @@ static long sync_serial_ioctl(struct file *file,
static ssize_t sync_serial_write(struct file *file, const char *buf, static ssize_t sync_serial_write(struct file *file, const char *buf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
int dev = MINOR(file->f_dentry->d_inode->i_rdev); int dev = MINOR(file_inode(file)->i_rdev);
DECLARE_WAITQUEUE(wait, current); DECLARE_WAITQUEUE(wait, current);
struct sync_port *port; struct sync_port *port;
unsigned long flags; unsigned long flags;
...@@ -1097,7 +1097,7 @@ static ssize_t sync_serial_write(struct file *file, const char *buf, ...@@ -1097,7 +1097,7 @@ static ssize_t sync_serial_write(struct file *file, const char *buf,
static ssize_t sync_serial_read(struct file *file, char *buf, static ssize_t sync_serial_read(struct file *file, char *buf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
int dev = MINOR(file->f_dentry->d_inode->i_rdev); int dev = MINOR(file_inode(file)->i_rdev);
int avail; int avail;
struct sync_port *port; struct sync_port *port;
unsigned char *start; unsigned char *start;
......
...@@ -3135,11 +3135,10 @@ static long cryptocop_ioctl_unlocked(struct inode *inode, ...@@ -3135,11 +3135,10 @@ static long cryptocop_ioctl_unlocked(struct inode *inode,
static long static long
cryptocop_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) cryptocop_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
{ {
struct inode *inode = file->f_path.dentry->d_inode;
long ret; long ret;
mutex_lock(&cryptocop_mutex); mutex_lock(&cryptocop_mutex);
ret = cryptocop_ioctl_unlocked(inode, filp, cmd, arg); ret = cryptocop_ioctl_unlocked(file_inode(filp), filp, cmd, arg);
mutex_unlock(&cryptocop_mutex); mutex_unlock(&cryptocop_mutex);
return ret; return ret;
......
...@@ -609,7 +609,7 @@ static int sync_serial_release(struct inode *inode, struct file *file) ...@@ -609,7 +609,7 @@ static int sync_serial_release(struct inode *inode, struct file *file)
static unsigned int sync_serial_poll(struct file *file, poll_table *wait) static unsigned int sync_serial_poll(struct file *file, poll_table *wait)
{ {
int dev = iminor(file->f_path.dentry->d_inode); int dev = iminor(file_inode(file));
unsigned int mask = 0; unsigned int mask = 0;
sync_port *port; sync_port *port;
DEBUGPOLL( static unsigned int prev_mask = 0; ); DEBUGPOLL( static unsigned int prev_mask = 0; );
...@@ -657,7 +657,7 @@ static int sync_serial_ioctl(struct file *file, ...@@ -657,7 +657,7 @@ static int sync_serial_ioctl(struct file *file,
{ {
int return_val = 0; int return_val = 0;
int dma_w_size = regk_dma_set_w_size1; int dma_w_size = regk_dma_set_w_size1;
int dev = iminor(file->f_path.dentry->d_inode); int dev = iminor(file_inode(file));
sync_port *port; sync_port *port;
reg_sser_rw_tr_cfg tr_cfg; reg_sser_rw_tr_cfg tr_cfg;
reg_sser_rw_rec_cfg rec_cfg; reg_sser_rw_rec_cfg rec_cfg;
...@@ -979,7 +979,7 @@ static long sync_serial_ioctl(struct file *file, ...@@ -979,7 +979,7 @@ static long sync_serial_ioctl(struct file *file,
static ssize_t sync_serial_write(struct file *file, const char *buf, static ssize_t sync_serial_write(struct file *file, const char *buf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
int dev = iminor(file->f_path.dentry->d_inode); int dev = iminor(file_inode(file));
DECLARE_WAITQUEUE(wait, current); DECLARE_WAITQUEUE(wait, current);
struct sync_port *port; struct sync_port *port;
int trunc_count; int trunc_count;
...@@ -1102,7 +1102,7 @@ static ssize_t sync_serial_write(struct file *file, const char *buf, ...@@ -1102,7 +1102,7 @@ static ssize_t sync_serial_write(struct file *file, const char *buf,
static ssize_t sync_serial_read(struct file * file, char * buf, static ssize_t sync_serial_read(struct file * file, char * buf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
int dev = iminor(file->f_path.dentry->d_inode); int dev = iminor(file_inode(file));
int avail; int avail;
sync_port *port; sync_port *port;
unsigned char* start; unsigned char* start;
......
...@@ -301,7 +301,7 @@ salinfo_event_open(struct inode *inode, struct file *file) ...@@ -301,7 +301,7 @@ salinfo_event_open(struct inode *inode, struct file *file)
static ssize_t static ssize_t
salinfo_event_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) salinfo_event_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos)
{ {
struct inode *inode = file->f_path.dentry->d_inode; struct inode *inode = file_inode(file);
struct proc_dir_entry *entry = PDE(inode); struct proc_dir_entry *entry = PDE(inode);
struct salinfo_data *data = entry->data; struct salinfo_data *data = entry->data;
char cmd[32]; char cmd[32];
...@@ -463,7 +463,7 @@ salinfo_log_new_read(int cpu, struct salinfo_data *data) ...@@ -463,7 +463,7 @@ salinfo_log_new_read(int cpu, struct salinfo_data *data)
static ssize_t static ssize_t
salinfo_log_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) salinfo_log_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos)
{ {
struct inode *inode = file->f_path.dentry->d_inode; struct inode *inode = file_inode(file);
struct proc_dir_entry *entry = PDE(inode); struct proc_dir_entry *entry = PDE(inode);
struct salinfo_data *data = entry->data; struct salinfo_data *data = entry->data;
u8 *buf; u8 *buf;
...@@ -524,7 +524,7 @@ salinfo_log_clear(struct salinfo_data *data, int cpu) ...@@ -524,7 +524,7 @@ salinfo_log_clear(struct salinfo_data *data, int cpu)
static ssize_t static ssize_t
salinfo_log_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos) salinfo_log_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos)
{ {
struct inode *inode = file->f_path.dentry->d_inode; struct inode *inode = file_inode(file);
struct proc_dir_entry *entry = PDE(inode); struct proc_dir_entry *entry = PDE(inode);
struct salinfo_data *data = entry->data; struct salinfo_data *data = entry->data;
char cmd[32]; char cmd[32];
......
...@@ -399,11 +399,9 @@ static int file_release(struct inode *inode, struct file *filp) ...@@ -399,11 +399,9 @@ static int file_release(struct inode *inode, struct file *filp)
static unsigned int file_poll(struct file *file, poll_table * wait) static unsigned int file_poll(struct file *file, poll_table * wait)
{ {
int minor; int minor = iminor(file_inode(file));
unsigned int mask = 0; unsigned int mask = 0;
minor = iminor(file->f_path.dentry->d_inode);
poll_wait(file, &channel_wqs[minor].rt_queue, wait); poll_wait(file, &channel_wqs[minor].rt_queue, wait);
poll_wait(file, &channel_wqs[minor].lx_queue, wait); poll_wait(file, &channel_wqs[minor].lx_queue, wait);
...@@ -424,7 +422,7 @@ static unsigned int file_poll(struct file *file, poll_table * wait) ...@@ -424,7 +422,7 @@ static unsigned int file_poll(struct file *file, poll_table * wait)
static ssize_t file_read(struct file *file, char __user * buffer, size_t count, static ssize_t file_read(struct file *file, char __user * buffer, size_t count,
loff_t * ppos) loff_t * ppos)
{ {
int minor = iminor(file->f_path.dentry->d_inode); int minor = iminor(file_inode(file));
/* data available? */ /* data available? */
if (!rtlx_read_poll(minor, (file->f_flags & O_NONBLOCK) ? 0 : 1)) { if (!rtlx_read_poll(minor, (file->f_flags & O_NONBLOCK) ? 0 : 1)) {
...@@ -437,11 +435,8 @@ static ssize_t file_read(struct file *file, char __user * buffer, size_t count, ...@@ -437,11 +435,8 @@ static ssize_t file_read(struct file *file, char __user * buffer, size_t count,
static ssize_t file_write(struct file *file, const char __user * buffer, static ssize_t file_write(struct file *file, const char __user * buffer,
size_t count, loff_t * ppos) size_t count, loff_t * ppos)
{ {
int minor; int minor = iminor(file_inode(file));
struct rtlx_channel *rt; struct rtlx_channel *rt = &rtlx->channel[minor];
minor = iminor(file->f_path.dentry->d_inode);
rt = &rtlx->channel[minor];
/* any space left... */ /* any space left... */
if (!rtlx_write_poll(minor)) { if (!rtlx_write_poll(minor)) {
......
...@@ -1149,7 +1149,7 @@ static ssize_t vpe_write(struct file *file, const char __user * buffer, ...@@ -1149,7 +1149,7 @@ static ssize_t vpe_write(struct file *file, const char __user * buffer,
size_t ret = count; size_t ret = count;
struct vpe *v; struct vpe *v;
if (iminor(file->f_path.dentry->d_inode) != minor) if (iminor(file_inode(file)) != minor)
return -ENODEV; return -ENODEV;
v = get_vpe(tclimit); v = get_vpe(tclimit);
......
...@@ -64,7 +64,7 @@ static int pvc_line_proc_open(struct inode *inode, struct file *file) ...@@ -64,7 +64,7 @@ static int pvc_line_proc_open(struct inode *inode, struct file *file)
static ssize_t pvc_line_proc_write(struct file *file, const char __user *buf, static ssize_t pvc_line_proc_write(struct file *file, const char __user *buf,
size_t count, loff_t *pos) size_t count, loff_t *pos)
{ {
int lineno = *(int *)PDE(file->f_path.dentry->d_inode)->data; int lineno = *(int *)PDE(file_inode(file))->data;
char kbuf[PVC_LINELEN]; char kbuf[PVC_LINELEN];
size_t len; size_t len;
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
static loff_t page_map_seek( struct file *file, loff_t off, int whence) static loff_t page_map_seek( struct file *file, loff_t off, int whence)
{ {
loff_t new; loff_t new;
struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); struct proc_dir_entry *dp = PDE(file_inode(file));
switch(whence) { switch(whence) {
case 0: case 0:
...@@ -55,13 +55,13 @@ static loff_t page_map_seek( struct file *file, loff_t off, int whence) ...@@ -55,13 +55,13 @@ static loff_t page_map_seek( struct file *file, loff_t off, int whence)
static ssize_t page_map_read( struct file *file, char __user *buf, size_t nbytes, static ssize_t page_map_read( struct file *file, char __user *buf, size_t nbytes,
loff_t *ppos) loff_t *ppos)
{ {
struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); struct proc_dir_entry *dp = PDE(file_inode(file));
return simple_read_from_buffer(buf, nbytes, ppos, dp->data, dp->size); return simple_read_from_buffer(buf, nbytes, ppos, dp->data, dp->size);
} }
static int page_map_mmap( struct file *file, struct vm_area_struct *vma ) static int page_map_mmap( struct file *file, struct vm_area_struct *vma )
{ {
struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); struct proc_dir_entry *dp = PDE(file_inode(file));
if ((vma->vm_end - vma->vm_start) > dp->size) if ((vma->vm_end - vma->vm_start) > dp->size)
return -EINVAL; return -EINVAL;
......
...@@ -191,7 +191,7 @@ static void free_flash_list(struct flash_block_list *f) ...@@ -191,7 +191,7 @@ static void free_flash_list(struct flash_block_list *f)
static int rtas_flash_release(struct inode *inode, struct file *file) static int rtas_flash_release(struct inode *inode, struct file *file)
{ {
struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); struct proc_dir_entry *dp = PDE(file_inode(file));
struct rtas_update_flash_t *uf; struct rtas_update_flash_t *uf;
uf = (struct rtas_update_flash_t *) dp->data; uf = (struct rtas_update_flash_t *) dp->data;
...@@ -253,7 +253,7 @@ static void get_flash_status_msg(int status, char *buf) ...@@ -253,7 +253,7 @@ static void get_flash_status_msg(int status, char *buf)
static ssize_t rtas_flash_read(struct file *file, char __user *buf, static ssize_t rtas_flash_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); struct proc_dir_entry *dp = PDE(file_inode(file));
struct rtas_update_flash_t *uf; struct rtas_update_flash_t *uf;
char msg[RTAS_MSG_MAXLEN]; char msg[RTAS_MSG_MAXLEN];
...@@ -282,7 +282,7 @@ void rtas_block_ctor(void *ptr) ...@@ -282,7 +282,7 @@ void rtas_block_ctor(void *ptr)
static ssize_t rtas_flash_write(struct file *file, const char __user *buffer, static ssize_t rtas_flash_write(struct file *file, const char __user *buffer,
size_t count, loff_t *off) size_t count, loff_t *off)
{ {
struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); struct proc_dir_entry *dp = PDE(file_inode(file));
struct rtas_update_flash_t *uf; struct rtas_update_flash_t *uf;
char *p; char *p;
int next_free; int next_free;
...@@ -374,7 +374,7 @@ static void manage_flash(struct rtas_manage_flash_t *args_buf) ...@@ -374,7 +374,7 @@ static void manage_flash(struct rtas_manage_flash_t *args_buf)
static ssize_t manage_flash_read(struct file *file, char __user *buf, static ssize_t manage_flash_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); struct proc_dir_entry *dp = PDE(file_inode(file));
struct rtas_manage_flash_t *args_buf; struct rtas_manage_flash_t *args_buf;
char msg[RTAS_MSG_MAXLEN]; char msg[RTAS_MSG_MAXLEN];
int msglen; int msglen;
...@@ -391,7 +391,7 @@ static ssize_t manage_flash_read(struct file *file, char __user *buf, ...@@ -391,7 +391,7 @@ static ssize_t manage_flash_read(struct file *file, char __user *buf,
static ssize_t manage_flash_write(struct file *file, const char __user *buf, static ssize_t manage_flash_write(struct file *file, const char __user *buf,
size_t count, loff_t *off) size_t count, loff_t *off)
{ {
struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); struct proc_dir_entry *dp = PDE(file_inode(file));
struct rtas_manage_flash_t *args_buf; struct rtas_manage_flash_t *args_buf;
const char reject_str[] = "0"; const char reject_str[] = "0";
const char commit_str[] = "1"; const char commit_str[] = "1";
...@@ -462,7 +462,7 @@ static int get_validate_flash_msg(struct rtas_validate_flash_t *args_buf, ...@@ -462,7 +462,7 @@ static int get_validate_flash_msg(struct rtas_validate_flash_t *args_buf,
static ssize_t validate_flash_read(struct file *file, char __user *buf, static ssize_t validate_flash_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); struct proc_dir_entry *dp = PDE(file_inode(file));
struct rtas_validate_flash_t *args_buf; struct rtas_validate_flash_t *args_buf;
char msg[RTAS_MSG_MAXLEN]; char msg[RTAS_MSG_MAXLEN];
int msglen; int msglen;
...@@ -477,7 +477,7 @@ static ssize_t validate_flash_read(struct file *file, char __user *buf, ...@@ -477,7 +477,7 @@ static ssize_t validate_flash_read(struct file *file, char __user *buf,
static ssize_t validate_flash_write(struct file *file, const char __user *buf, static ssize_t validate_flash_write(struct file *file, const char __user *buf,
size_t count, loff_t *off) size_t count, loff_t *off)
{ {
struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); struct proc_dir_entry *dp = PDE(file_inode(file));
struct rtas_validate_flash_t *args_buf; struct rtas_validate_flash_t *args_buf;
int rc; int rc;
...@@ -526,7 +526,7 @@ static ssize_t validate_flash_write(struct file *file, const char __user *buf, ...@@ -526,7 +526,7 @@ static ssize_t validate_flash_write(struct file *file, const char __user *buf,
static int validate_flash_release(struct inode *inode, struct file *file) static int validate_flash_release(struct inode *inode, struct file *file)
{ {
struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); struct proc_dir_entry *dp = PDE(file_inode(file));
struct rtas_validate_flash_t *args_buf; struct rtas_validate_flash_t *args_buf;
args_buf = (struct rtas_validate_flash_t *) dp->data; args_buf = (struct rtas_validate_flash_t *) dp->data;
......
...@@ -111,7 +111,7 @@ static int match_context(const void *v, struct file *file, unsigned fd) ...@@ -111,7 +111,7 @@ static int match_context(const void *v, struct file *file, unsigned fd)
struct spu_context *ctx; struct spu_context *ctx;
if (file->f_op != &spufs_context_fops) if (file->f_op != &spufs_context_fops)
return 0; return 0;
ctx = SPUFS_I(file->f_dentry->d_inode)->i_ctx; ctx = SPUFS_I(file_inode(file))->i_ctx;
if (ctx->flags & SPU_CREATE_NOSCHED) if (ctx->flags & SPU_CREATE_NOSCHED)
return 0; return 0;
return fd + 1; return fd + 1;
...@@ -137,7 +137,7 @@ static struct spu_context *coredump_next_context(int *fd) ...@@ -137,7 +137,7 @@ static struct spu_context *coredump_next_context(int *fd)
return NULL; return NULL;
*fd = n - 1; *fd = n - 1;
file = fcheck(*fd); file = fcheck(*fd);
return SPUFS_I(file->f_dentry->d_inode)->i_ctx; return SPUFS_I(file_inode(file))->i_ctx;
} }
int spufs_coredump_extra_notes_size(void) int spufs_coredump_extra_notes_size(void)
......
...@@ -1852,7 +1852,7 @@ static int spufs_mfc_flush(struct file *file, fl_owner_t id) ...@@ -1852,7 +1852,7 @@ static int spufs_mfc_flush(struct file *file, fl_owner_t id)
static int spufs_mfc_fsync(struct file *file, loff_t start, loff_t end, int datasync) static int spufs_mfc_fsync(struct file *file, loff_t start, loff_t end, int datasync)
{ {
struct inode *inode = file->f_path.dentry->d_inode; struct inode *inode = file_inode(file);
int err = filemap_write_and_wait_range(inode->i_mapping, start, end); int err = filemap_write_and_wait_range(inode->i_mapping, start, end);
if (!err) { if (!err) {
mutex_lock(&inode->i_mutex); mutex_lock(&inode->i_mutex);
...@@ -2501,7 +2501,7 @@ static int switch_log_sprint(struct spu_context *ctx, char *tbuf, int n) ...@@ -2501,7 +2501,7 @@ static int switch_log_sprint(struct spu_context *ctx, char *tbuf, int n)
static ssize_t spufs_switch_log_read(struct file *file, char __user *buf, static ssize_t spufs_switch_log_read(struct file *file, char __user *buf,
size_t len, loff_t *ppos) size_t len, loff_t *ppos)
{ {
struct inode *inode = file->f_path.dentry->d_inode; struct inode *inode = file_inode(file);
struct spu_context *ctx = SPUFS_I(inode)->i_ctx; struct spu_context *ctx = SPUFS_I(inode)->i_ctx;
int error = 0, cnt = 0; int error = 0, cnt = 0;
...@@ -2571,7 +2571,7 @@ static ssize_t spufs_switch_log_read(struct file *file, char __user *buf, ...@@ -2571,7 +2571,7 @@ static ssize_t spufs_switch_log_read(struct file *file, char __user *buf,
static unsigned int spufs_switch_log_poll(struct file *file, poll_table *wait) static unsigned int spufs_switch_log_poll(struct file *file, poll_table *wait)
{ {
struct inode *inode = file->f_path.dentry->d_inode; struct inode *inode = file_inode(file);
struct spu_context *ctx = SPUFS_I(inode)->i_ctx; struct spu_context *ctx = SPUFS_I(inode)->i_ctx;
unsigned int mask = 0; unsigned int mask = 0;
int rc; int rc;
......
...@@ -368,7 +368,7 @@ spufs_assert_affinity(unsigned int flags, struct spu_gang *gang, ...@@ -368,7 +368,7 @@ spufs_assert_affinity(unsigned int flags, struct spu_gang *gang,
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
neighbor = get_spu_context( neighbor = get_spu_context(
SPUFS_I(filp->f_dentry->d_inode)->i_ctx); SPUFS_I(file_inode(filp))->i_ctx);
if (!list_empty(&neighbor->aff_list) && !(neighbor->aff_head) && if (!list_empty(&neighbor->aff_list) && !(neighbor->aff_head) &&
!list_is_last(&neighbor->aff_list, &gang->aff_list_head) && !list_is_last(&neighbor->aff_list, &gang->aff_list_head) &&
......
...@@ -47,7 +47,7 @@ static long do_spu_run(struct file *filp, ...@@ -47,7 +47,7 @@ static long do_spu_run(struct file *filp,
if (filp->f_op != &spufs_context_fops) if (filp->f_op != &spufs_context_fops)
goto out; goto out;
i = SPUFS_I(filp->f_path.dentry->d_inode); i = SPUFS_I(file_inode(filp));
ret = spufs_run_spu(i->i_ctx, &npc, &status); ret = spufs_run_spu(i->i_ctx, &npc, &status);
if (put_user(npc, unpc)) if (put_user(npc, unpc))
......
...@@ -86,7 +86,7 @@ static int hcall_inst_seq_open(struct inode *inode, struct file *file) ...@@ -86,7 +86,7 @@ static int hcall_inst_seq_open(struct inode *inode, struct file *file)
rc = seq_open(file, &hcall_inst_seq_ops); rc = seq_open(file, &hcall_inst_seq_ops);
seq = file->private_data; seq = file->private_data;
seq->private = file->f_path.dentry->d_inode->i_private; seq->private = file_inode(file)->i_private;
return rc;