diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-01-23 17:07:38 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-22 23:31:31 -0500 |
commit | 496ad9aa8ef448058e36ca7a787c61f2e63f0f54 (patch) | |
tree | 8f4abde793cd7db5bb8fde6d27ebcacd0e54379a /arch/powerpc/platforms/cell | |
parent | 57eccb830f1cc93d4b506ba306d8dfa685e0c88f (diff) |
new helper: file_inode(file)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/powerpc/platforms/cell')
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/coredump.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/file.c | 6 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/inode.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/syscalls.c | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/coredump.c b/arch/powerpc/platforms/cell/spufs/coredump.c index 657e3f233a64..c9500ea7be2f 100644 --- a/arch/powerpc/platforms/cell/spufs/coredump.c +++ b/arch/powerpc/platforms/cell/spufs/coredump.c | |||
@@ -111,7 +111,7 @@ static int match_context(const void *v, struct file *file, unsigned fd) | |||
111 | struct spu_context *ctx; | 111 | struct spu_context *ctx; |
112 | if (file->f_op != &spufs_context_fops) | 112 | if (file->f_op != &spufs_context_fops) |
113 | return 0; | 113 | return 0; |
114 | ctx = SPUFS_I(file->f_dentry->d_inode)->i_ctx; | 114 | ctx = SPUFS_I(file_inode(file))->i_ctx; |
115 | if (ctx->flags & SPU_CREATE_NOSCHED) | 115 | if (ctx->flags & SPU_CREATE_NOSCHED) |
116 | return 0; | 116 | return 0; |
117 | return fd + 1; | 117 | return fd + 1; |
@@ -137,7 +137,7 @@ static struct spu_context *coredump_next_context(int *fd) | |||
137 | return NULL; | 137 | return NULL; |
138 | *fd = n - 1; | 138 | *fd = n - 1; |
139 | file = fcheck(*fd); | 139 | file = fcheck(*fd); |
140 | return SPUFS_I(file->f_dentry->d_inode)->i_ctx; | 140 | return SPUFS_I(file_inode(file))->i_ctx; |
141 | } | 141 | } |
142 | 142 | ||
143 | int spufs_coredump_extra_notes_size(void) | 143 | int spufs_coredump_extra_notes_size(void) |
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c index 0cfece4cf6ef..68c57d38745a 100644 --- a/arch/powerpc/platforms/cell/spufs/file.c +++ b/arch/powerpc/platforms/cell/spufs/file.c | |||
@@ -1852,7 +1852,7 @@ out: | |||
1852 | 1852 | ||
1853 | static int spufs_mfc_fsync(struct file *file, loff_t start, loff_t end, int datasync) | 1853 | static int spufs_mfc_fsync(struct file *file, loff_t start, loff_t end, int datasync) |
1854 | { | 1854 | { |
1855 | struct inode *inode = file->f_path.dentry->d_inode; | 1855 | struct inode *inode = file_inode(file); |
1856 | int err = filemap_write_and_wait_range(inode->i_mapping, start, end); | 1856 | int err = filemap_write_and_wait_range(inode->i_mapping, start, end); |
1857 | if (!err) { | 1857 | if (!err) { |
1858 | mutex_lock(&inode->i_mutex); | 1858 | mutex_lock(&inode->i_mutex); |
@@ -2501,7 +2501,7 @@ static int switch_log_sprint(struct spu_context *ctx, char *tbuf, int n) | |||
2501 | static ssize_t spufs_switch_log_read(struct file *file, char __user *buf, | 2501 | static ssize_t spufs_switch_log_read(struct file *file, char __user *buf, |
2502 | size_t len, loff_t *ppos) | 2502 | size_t len, loff_t *ppos) |
2503 | { | 2503 | { |
2504 | struct inode *inode = file->f_path.dentry->d_inode; | 2504 | struct inode *inode = file_inode(file); |
2505 | struct spu_context *ctx = SPUFS_I(inode)->i_ctx; | 2505 | struct spu_context *ctx = SPUFS_I(inode)->i_ctx; |
2506 | int error = 0, cnt = 0; | 2506 | int error = 0, cnt = 0; |
2507 | 2507 | ||
@@ -2571,7 +2571,7 @@ static ssize_t spufs_switch_log_read(struct file *file, char __user *buf, | |||
2571 | 2571 | ||
2572 | static unsigned int spufs_switch_log_poll(struct file *file, poll_table *wait) | 2572 | static unsigned int spufs_switch_log_poll(struct file *file, poll_table *wait) |
2573 | { | 2573 | { |
2574 | struct inode *inode = file->f_path.dentry->d_inode; | 2574 | struct inode *inode = file_inode(file); |
2575 | struct spu_context *ctx = SPUFS_I(inode)->i_ctx; | 2575 | struct spu_context *ctx = SPUFS_I(inode)->i_ctx; |
2576 | unsigned int mask = 0; | 2576 | unsigned int mask = 0; |
2577 | int rc; | 2577 | int rc; |
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index dba1ce235da5..99db6161e5c9 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c | |||
@@ -368,7 +368,7 @@ spufs_assert_affinity(unsigned int flags, struct spu_gang *gang, | |||
368 | return ERR_PTR(-EINVAL); | 368 | return ERR_PTR(-EINVAL); |
369 | 369 | ||
370 | neighbor = get_spu_context( | 370 | neighbor = get_spu_context( |
371 | SPUFS_I(filp->f_dentry->d_inode)->i_ctx); | 371 | SPUFS_I(file_inode(filp))->i_ctx); |
372 | 372 | ||
373 | if (!list_empty(&neighbor->aff_list) && !(neighbor->aff_head) && | 373 | if (!list_empty(&neighbor->aff_list) && !(neighbor->aff_head) && |
374 | !list_is_last(&neighbor->aff_list, &gang->aff_list_head) && | 374 | !list_is_last(&neighbor->aff_list, &gang->aff_list_head) && |
diff --git a/arch/powerpc/platforms/cell/spufs/syscalls.c b/arch/powerpc/platforms/cell/spufs/syscalls.c index baee994fe810..b045fdda4845 100644 --- a/arch/powerpc/platforms/cell/spufs/syscalls.c +++ b/arch/powerpc/platforms/cell/spufs/syscalls.c | |||
@@ -47,7 +47,7 @@ static long do_spu_run(struct file *filp, | |||
47 | if (filp->f_op != &spufs_context_fops) | 47 | if (filp->f_op != &spufs_context_fops) |
48 | goto out; | 48 | goto out; |
49 | 49 | ||
50 | i = SPUFS_I(filp->f_path.dentry->d_inode); | 50 | i = SPUFS_I(file_inode(filp)); |
51 | ret = spufs_run_spu(i->i_ctx, &npc, &status); | 51 | ret = spufs_run_spu(i->i_ctx, &npc, &status); |
52 | 52 | ||
53 | if (put_user(npc, unpc)) | 53 | if (put_user(npc, unpc)) |