Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in / Register
Toggle navigation
L
linux-next
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
48
Issues
48
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Librem5
linux-next
Commits
496ad9aa
Commit
496ad9aa
authored
Jan 23, 2013
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new helper: file_inode(file)
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
57eccb83
Changes
306
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
306 changed files
with
696 additions
and
717 deletions
+696
-717
srm_env.c
arch/alpha/kernel/srm_env.c
+1
-1
cplbinfo.c
arch/blackfin/kernel/cplbinfo.c
+1
-1
sync_serial.c
arch/cris/arch-v10/drivers/sync_serial.c
+4
-4
cryptocop.c
arch/cris/arch-v32/drivers/cryptocop.c
+1
-2
sync_serial.c
arch/cris/arch-v32/drivers/sync_serial.c
+4
-4
salinfo.c
arch/ia64/kernel/salinfo.c
+3
-3
rtlx.c
arch/mips/kernel/rtlx.c
+4
-9
vpe.c
arch/mips/kernel/vpe.c
+1
-1
picvue_proc.c
arch/mips/lasat/picvue_proc.c
+1
-1
proc_powerpc.c
arch/powerpc/kernel/proc_powerpc.c
+3
-3
rtas_flash.c
arch/powerpc/kernel/rtas_flash.c
+8
-8
coredump.c
arch/powerpc/platforms/cell/spufs/coredump.c
+2
-2
file.c
arch/powerpc/platforms/cell/spufs/file.c
+3
-3
inode.c
arch/powerpc/platforms/cell/spufs/inode.c
+1
-1
syscalls.c
arch/powerpc/platforms/cell/spufs/syscalls.c
+1
-1
hvCall_inst.c
arch/powerpc/platforms/pseries/hvCall_inst.c
+1
-1
scanlog.c
arch/powerpc/platforms/pseries/scanlog.c
+2
-6
hypfs_dbfs.c
arch/s390/hypfs/hypfs_dbfs.c
+1
-1
inode.c
arch/s390/hypfs/inode.c
+1
-1
debug.c
arch/s390/kernel/debug.c
+1
-1
pci_debug.c
arch/s390/pci/pci_debug.c
+2
-2
alignment.c
arch/sh/mm/alignment.c
+1
-1
ia32_aout.c
arch/x86/ia32/ia32_aout.c
+2
-4
cpuid.c
arch/x86/kernel/cpuid.c
+2
-2
DAC960.c
drivers/block/DAC960.c
+1
-1
nbd.c
drivers/block/nbd.c
+1
-1
dsp56k.c
drivers/char/dsp56k.c
+4
-4
dtlk.c
drivers/char/dtlk.c
+2
-2
lp.c
drivers/char/lp.c
+4
-4
mem.c
drivers/char/mem.c
+2
-2
nsc_gpio.c
drivers/char/nsc_gpio.c
+2
-2
cm4000_cs.c
drivers/char/pcmcia/cm4000_cs.c
+1
-1
ppdev.c
drivers/char/ppdev.c
+3
-3
ps3flash.c
drivers/char/ps3flash.c
+1
-1
raw.c
drivers/char/raw.c
+1
-1
sonypi.c
drivers/char/sonypi.c
+1
-1
tb0219.c
drivers/char/tb0219.c
+2
-2
gtt.c
drivers/gpu/drm/gma500/gtt.c
+1
-1
i915_gem.c
drivers/gpu/drm/i915/i915_gem.c
+5
-5
ttm_tt.c
drivers/gpu/drm/ttm/ttm_tt.c
+2
-2
udl_gem.c
drivers/gpu/drm/udl/udl_gem.c
+1
-1
hid-roccat.c
drivers/hid/hid-roccat.c
+1
-1
hidraw.c
drivers/hid/hidraw.c
+3
-3
i2c-dev.c
drivers/i2c/i2c-dev.c
+2
-2
ide-proc.c
drivers/ide/ide-proc.c
+2
-2
uverbs_cmd.c
drivers/infiniband/core/uverbs_cmd.c
+1
-1
ipath_file_ops.c
drivers/infiniband/hw/ipath/ipath_file_ops.c
+2
-2
ipath_fs.c
drivers/infiniband/hw/ipath/ipath_fs.c
+3
-3
qib_file_ops.c
drivers/infiniband/hw/qib/qib_file_ops.c
+1
-1
qib_fs.c
drivers/infiniband/hw/qib/qib_fs.c
+2
-2
tegra-smmu.c
drivers/iommu/tegra-smmu.c
+1
-3
divasproc.c
drivers/isdn/hardware/eicon/divasproc.c
+3
-3
hysdn_proclog.c
drivers/isdn/hysdn/hysdn_proclog.c
+2
-2
isdn_common.c
drivers/isdn/i4l/isdn_common.c
+4
-4
isdn_ppp.c
drivers/isdn/i4l/isdn_ppp.c
+1
-1
bitmap.c
drivers/md/bitmap.c
+2
-2
zoran_procfs.c
drivers/media/pci/zoran/zoran_procfs.c
+1
-1
lirc_dev.c
drivers/media/rc/lirc_dev.c
+7
-7
v4l2-dev.c
drivers/media/v4l2-core/v4l2-dev.c
+1
-1
cdev.c
drivers/mtd/ubi/cdev.c
+1
-1
cxgb4_main.c
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+1
-1
cosa.c
drivers/net/wan/cosa.c
+2
-2
ray_cs.c
drivers/net/wireless/ray_cs.c
+1
-1
led.c
drivers/parisc/led.c
+1
-1
proc.c
drivers/pci/proc.c
+5
-5
sony-laptop.c
drivers/platform/x86/sony-laptop.c
+1
-1
thinkpad_acpi.c
drivers/platform/x86/thinkpad_acpi.c
+1
-1
toshiba_acpi.c
drivers/platform/x86/toshiba_acpi.c
+4
-4
proc.c
drivers/pnp/isapnp/proc.c
+2
-2
proc.c
drivers/pnp/pnpbios/proc.c
+1
-1
fs3270.c
drivers/s390/char/fs3270.c
+2
-2
tape_char.c
drivers/s390/char/tape_char.c
+4
-4
vmur.c
drivers/s390/char/vmur.c
+1
-1
qdio_debug.c
drivers/s390/cio/qdio_debug.c
+2
-2
display7seg.c
drivers/sbus/char/display7seg.c
+1
-1
3w-9xxx.c
drivers/scsi/3w-9xxx.c
+1
-1
3w-sas.c
drivers/scsi/3w-sas.c
+1
-1
3w-xxxx.c
drivers/scsi/3w-xxxx.c
+1
-1
csio_init.c
drivers/scsi/csiostor/csio_init.c
+1
-1
dpt_i2o.c
drivers/scsi/dpt_i2o.c
+2
-2
st.c
drivers/scsi/st.c
+1
-1
Misc.c
drivers/staging/bcm/Misc.c
+1
-1
f_mass_storage.c
drivers/staging/ccg/f_mass_storage.c
+1
-1
rndis.c
drivers/staging/ccg/rndis.c
+1
-1
storage_common.c
drivers/staging/ccg/storage_common.c
+1
-1
dgrp_specproc.c
drivers/staging/dgrp/dgrp_specproc.c
+2
-2
omap_gem_helpers.c
drivers/staging/omapdrm/omap_gem_helpers.c
+1
-1
usbip_common.c
drivers/staging/usbip/usbip_common.c
+1
-1
vme_user.c
drivers/staging/vme/devices/vme_user.c
+4
-4
target_core_file.c
drivers/target/target_core_file.c
+1
-1
vc_screen.c
drivers/tty/vt/vc_screen.c
+4
-4
devices.c
drivers/usb/core/devices.c
+2
-2
devio.c
drivers/usb/core/devio.c
+3
-3
atmel_usba_udc.c
drivers/usb/gadget/atmel_usba_udc.c
+4
-4
f_mass_storage.c
drivers/usb/gadget/f_mass_storage.c
+1
-1
printer.c
drivers/usb/gadget/printer.c
+1
-1
rndis.c
drivers/usb/gadget/rndis.c
+1
-1
storage_common.c
drivers/usb/gadget/storage_common.c
+1
-1
fb_defio.c
drivers/video/fb_defio.c
+1
-1
fbmem.c
drivers/video/fbmem.c
+1
-1
mdp.c
drivers/video/msm/mdp.c
+1
-1
cpwd.c
drivers/watchdog/cpwd.c
+2
-2
proc.c
drivers/zorro/proc.c
+2
-2
vfs_file.c
fs/9p/vfs_file.c
+5
-5
dir.c
fs/adfs/dir.c
+1
-1
dir.c
fs/affs/dir.c
+1
-1
dir.c
fs/afs/dir.c
+2
-2
flock.c
fs/afs/flock.c
+2
-2
write.c
fs/afs/write.c
+3
-4
autofs_i.h
fs/autofs4/autofs_i.h
+1
-1
dev-ioctl.c
fs/autofs4/dev-ioctl.c
+1
-1
root.c
fs/autofs4/root.c
+2
-2
linuxvfs.c
fs/befs/linuxvfs.c
+1
-1
dir.c
fs/bfs/dir.c
+1
-1
binfmt_aout.c
fs/binfmt_aout.c
+2
-2
binfmt_elf.c
fs/binfmt_elf.c
+1
-1
binfmt_elf_fdpic.c
fs/binfmt_elf_fdpic.c
+2
-2
binfmt_flat.c
fs/binfmt_flat.c
+1
-1
binfmt_misc.c
fs/binfmt_misc.c
+2
-2
block_dev.c
fs/block_dev.c
+1
-1
file.c
fs/btrfs/file.c
+4
-4
inode.c
fs/btrfs/inode.c
+2
-2
ioctl.c
fs/btrfs/ioctl.c
+26
-26
send.c
fs/btrfs/send.c
+1
-1
buffer.c
fs/buffer.c
+2
-2
addr.c
fs/ceph/addr.c
+6
-6
dir.c
fs/ceph/dir.c
+3
-3
file.c
fs/ceph/file.c
+5
-5
ioctl.c
fs/ceph/ioctl.c
+8
-8
locks.c
fs/ceph/locks.c
+1
-1
cifsfs.c
fs/cifs/cifsfs.c
+3
-3
file.c
fs/cifs/file.c
+13
-13
inode.c
fs/cifs/inode.c
+4
-4
ioctl.c
fs/cifs/ioctl.c
+1
-1
readdir.c
fs/cifs/readdir.c
+2
-2
dir.c
fs/coda/dir.c
+1
-1
file.c
fs/coda/file.c
+6
-6
inode.c
fs/coda/inode.c
+1
-1
pioctl.c
fs/coda/pioctl.c
+1
-1
compat_ioctl.c
fs/compat_ioctl.c
+1
-1
dir.c
fs/configfs/dir.c
+1
-1
coredump.c
fs/coredump.c
+2
-2
inode.c
fs/cramfs/inode.c
+1
-1
file.c
fs/ecryptfs/file.c
+2
-2
dir.c
fs/efs/dir.c
+1
-1
exec.c
fs/exec.c
+4
-4
dir.c
fs/exofs/dir.c
+1
-1
dir.c
fs/ext2/dir.c
+1
-1
ioctl.c
fs/ext2/ioctl.c
+1
-1
dir.c
fs/ext3/dir.c
+4
-4
ioctl.c
fs/ext3/ioctl.c
+1
-1
namei.c
fs/ext3/namei.c
+2
-2
dir.c
fs/ext4/dir.c
+4
-4
extents.c
fs/ext4/extents.c
+2
-2
file.c
fs/ext4/file.c
+1
-1
inline.c
fs/ext4/inline.c
+1
-1
inode.c
fs/ext4/inode.c
+3
-3
ioctl.c
fs/ext4/ioctl.c
+1
-1
move_extent.c
fs/ext4/move_extent.c
+3
-3
namei.c
fs/ext4/namei.c
+1
-1
super.c
fs/ext4/super.c
+1
-1
dir.c
fs/f2fs/dir.c
+1
-1
dir.c
fs/fat/dir.c
+3
-3
file.c
fs/fat/file.c
+2
-2
fcntl.c
fs/fcntl.c
+1
-1
file_table.c
fs/file_table.c
+1
-1
vxfs_lookup.c
fs/freevxfs/vxfs_lookup.c
+1
-1
control.c
fs/fuse/control.c
+1
-1
dir.c
fs/fuse/dir.c
+1
-1
file.c
fs/gfs2/file.c
+8
-9
rgrp.c
fs/gfs2/rgrp.c
+1
-1
dir.c
fs/hfs/dir.c
+1
-1
inode.c
fs/hfs/inode.c
+1
-1
dir.c
fs/hfsplus/dir.c
+1
-1
inode.c
fs/hfsplus/inode.c
+1
-1
ioctl.c
fs/hfsplus/ioctl.c
+2
-2
hostfs_kern.c
fs/hostfs/hostfs_kern.c
+1
-1
dir.c
fs/hpfs/dir.c
+2
-2
file.c
fs/hpfs/file.c
+1
-1
hppfs.c
fs/hppfs/hppfs.c
+4
-4
inode.c
fs/hugetlbfs/inode.c
+1
-1
inode.c
fs/inode.c
+1
-1
ioctl.c
fs/ioctl.c
+6
-6
compress.c
fs/isofs/compress.c
+1
-1
dir.c
fs/isofs/dir.c
+1
-1
dir.c
fs/jffs2/dir.c
+2
-2
ioctl.c
fs/jfs/ioctl.c
+1
-1
jfs_dtree.c
fs/jfs/jfs_dtree.c
+1
-1
clntlock.c
fs/lockd/clntlock.c
+1
-1
clntproc.c
fs/lockd/clntproc.c
+1
-1
svclock.c
fs/lockd/svclock.c
+8
-8
svcsubs.c
fs/lockd/svcsubs.c
+1
-1
locks.c
fs/locks.c
+12
-12
dir.c
fs/logfs/dir.c
+2
-2
file.c
fs/logfs/file.c
+1
-1
dir.c
fs/minix/dir.c
+1
-1
namei.c
fs/namei.c
+1
-1
namespace.c
fs/namespace.c
+1
-1
inode.c
fs/ncpfs/inode.c
+2
-2
ioctl.c
fs/ncpfs/ioctl.c
+1
-1
mmap.c
fs/ncpfs/mmap.c
+1
-1
dir.c
fs/nfs/dir.c
+4
-4
file.c
fs/nfs/file.c
+1
-1
idmap.c
fs/nfs/idmap.c
+1
-1
inode.c
fs/nfs/inode.c
+2
-2
nfs3proc.c
fs/nfs/nfs3proc.c
+1
-1
nfs4file.c
fs/nfs/nfs4file.c
+1
-1
proc.c
fs/nfs/proc.c
+1
-1
fault_inject.c
fs/nfsd/fault_inject.c
+3
-3
nfsctl.c
fs/nfsd/nfsctl.c
+1
-1
vfs.c
fs/nfsd/vfs.c
+3
-3
dir.c
fs/nilfs2/dir.c
+1
-1
file.c
fs/nilfs2/file.c
+1
-1
ioctl.c
fs/nilfs2/ioctl.c
+1
-1
dnotify.c
fs/notify/dnotify/dnotify.c
+2
-2
fanotify_user.c
fs/notify/fanotify/fanotify_user.c
+1
-1
dir.c
fs/ntfs/dir.c
+1
-1
aops.c
fs/ocfs2/aops.c
+2
-2
dir.c
fs/ocfs2/dir.c
+1
-1
dlmfs.c
fs/ocfs2/dlmfs/dlmfs.c
+3
-3
file.c
fs/ocfs2/file.c
+5
-5
ioctl.c
fs/ocfs2/ioctl.c
+2
-2
mmap.c
fs/ocfs2/mmap.c
+4
-4
move_extents.c
fs/ocfs2/move_extents.c
+1
-1
refcounttree.c
fs/ocfs2/refcounttree.c
+2
-2
dir.c
fs/omfs/dir.c
+2
-2
open.c
fs/open.c
+3
-3
inode.c
fs/openpromfs/inode.c
+1
-1
pipe.c
fs/pipe.c
+8
-8
base.c
fs/proc/base.c
+19
-19
generic.c
fs/proc/generic.c
+5
-5
inode.c
fs/proc/inode.c
+7
-7
nommu.c
fs/proc/nommu.c
+1
-1
proc_net.c
fs/proc/proc_net.c
+1
-1
proc_sysctl.c
fs/proc/proc_sysctl.c
+2
-2
task_mmu.c
fs/proc/task_mmu.c
+3
-3
task_nommu.c
fs/proc/task_nommu.c
+1
-1
dir.c
fs/qnx4/dir.c
+1
-1
dir.c
fs/qnx6/dir.c
+1
-1
file-nommu.c
fs/ramfs/file-nommu.c
+1
-1
read_write.c
fs/read_write.c
+4
-4
readdir.c
fs/readdir.c
+1
-1
file.c
fs/reiserfs/file.c
+1
-1
ioctl.c
fs/reiserfs/ioctl.c
+1
-1
procfs.c
fs/reiserfs/procfs.c
+1
-1
super.c
fs/romfs/super.c
+1
-1
splice.c
fs/splice.c
+1
-1
dir.c
fs/squashfs/dir.c
+1
-1
sync.c
fs/sync.c
+1
-1
bin.c
fs/sysfs/bin.c
+3
-3
dir.c
fs/sysv/dir.c
+1
-1
dir.c
fs/ubifs/dir.c
+1
-1
file.c
fs/ubifs/file.c
+1
-1
ioctl.c
fs/ubifs/ioctl.c
+1
-1
dir.c
fs/udf/dir.c
+1
-1
file.c
fs/udf/file.c
+2
-2
dir.c
fs/ufs/dir.c
+1
-1
xfs_dfrag.c
fs/xfs/xfs_dfrag.c
+4
-4
xfs_file.c
fs/xfs/xfs_file.c
+2
-2
xfs_ioctl.c
fs/xfs/xfs_ioctl.c
+3
-3
xfs_ioctl32.c
fs/xfs/xfs_ioctl32.c
+1
-1
fs.h
include/linux/fs.h
+7
-2
fsnotify.h
include/linux/fsnotify.h
+1
-1
hugetlb.h
include/linux/hugetlb.h
+1
-1
lockd.h
include/linux/lockd/lockd.h
+1
-1
mqueue.c
ipc/mqueue.c
+8
-8
shm.c
ipc/shm.c
+4
-4
acct.c
kernel/acct.c
+1
-1
cgroup.c
kernel/cgroup.c
+3
-3
core.c
kernel/events/core.c
+1
-1
fork.c
kernel/fork.c
+1
-1
proc.c
kernel/irq/proc.c
+1
-1
nsproxy.c
kernel/nsproxy.c
+1
-1
relay.c
kernel/relay.c
+2
-2
sys.c
kernel/sys.c
+4
-4
fadvise.c
mm/fadvise.c
+1
-1
filemap.c
mm/filemap.c
+1
-1
hugetlb.c
mm/hugetlb.c
+2
-2
mmap.c
mm/mmap.c
+4
-4
nommu.c
mm/nommu.c
+6
-6
shmem.c
mm/shmem.c
+6
-6
swapfile.c
mm/swapfile.c
+1
-1
proc.c
net/atm/proc.c
+1
-1
net_namespace.c
net/core/net_namespace.c
+1
-1
ipt_CLUSTERIP.c
net/ipv4/netfilter/ipt_CLUSTERIP.c
+1
-1
xt_recent.c
net/netfilter/xt_recent.c
+1
-1
af_netlink.c
net/netlink/af_netlink.c
+1
-1
auth_gss.c
net/sunrpc/auth_gss/auth_gss.c
+1
-1
cache.c
net/sunrpc/cache.c
+14
-14
rpc_pipe.c
net/sunrpc/rpc_pipe.c
+5
-5
garbage.c
net/unix/garbage.c
+1
-1
domain.c
security/apparmor/domain.c
+2
-2
file.c
security/apparmor/file.c
+2
-2
lsm.c
security/apparmor/lsm.c
+3
-3
ima_api.c
security/integrity/ima/ima_api.c
+3
-3
ima_crypto.c
security/integrity/ima/ima_crypto.c
+1
-1
ima_main.c
security/integrity/ima/ima_main.c
+2
-2
hooks.c
security/selinux/hooks.c
+5
-5
selinuxfs.c
security/selinux/selinuxfs.c
+8
-12
smack_lsm.c
security/smack/smack_lsm.c
+4
-10
securityfs_if.c
security/tomoyo/securityfs_if.c
+1
-1
info.c
sound/core/info.c
+1
-1
pcm_native.c
sound/core/pcm_native.c
+1
-1
msnd_pinnacle.c
sound/oss/msnd_pinnacle.c
+3
-3
soundcard.c
sound/oss/soundcard.c
+5
-5
sound_firmware.c
sound/sound_firmware.c
+1
-1
No files found.
arch/alpha/kernel/srm_env.c
View file @
496ad9aa
...
...
@@ -111,7 +111,7 @@ static ssize_t srm_env_proc_write(struct file *file, const char __user *buffer,
size_t
count
,
loff_t
*
pos
)
{
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
);
unsigned
long
ret1
,
ret2
;
...
...
arch/blackfin/kernel/cplbinfo.c
View file @
496ad9aa
...
...
@@ -116,7 +116,7 @@ static const struct seq_operations cplbinfo_sops = {
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
;
unsigned
int
cpu
;
int
ret
;
...
...
arch/cris/arch-v10/drivers/sync_serial.c
View file @
496ad9aa
...
...
@@ -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
)
{
int
dev
=
MINOR
(
file
->
f_dentry
->
d_inode
->
i_rdev
);
int
dev
=
MINOR
(
file
_inode
(
file
)
->
i_rdev
);
unsigned
int
mask
=
0
;
struct
sync_port
*
port
;
DEBUGPOLL
(
static
unsigned
int
prev_mask
=
0
);
...
...
@@ -685,7 +685,7 @@ static int sync_serial_ioctl_unlocked(struct file *file,
int
return_val
=
0
;
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
;
if
(
dev
<
0
||
dev
>=
NUMBER_OF_PORTS
||
!
ports
[
dev
].
enabled
)
{
...
...
@@ -973,7 +973,7 @@ static long sync_serial_ioctl(struct file *file,
static
ssize_t
sync_serial_write
(
struct
file
*
file
,
const
char
*
buf
,
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
);
struct
sync_port
*
port
;
unsigned
long
flags
;
...
...
@@ -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
,
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
;
struct
sync_port
*
port
;
unsigned
char
*
start
;
...
...
arch/cris/arch-v32/drivers/cryptocop.c
View file @
496ad9aa
...
...
@@ -3135,11 +3135,10 @@ static long cryptocop_ioctl_unlocked(struct inode *inode,
static
long
cryptocop_ioctl
(
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
struct
inode
*
inode
=
file
->
f_path
.
dentry
->
d_inode
;
long
ret
;
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
);
return
ret
;
...
...
arch/cris/arch-v32/drivers/sync_serial.c
View file @
496ad9aa
...
...
@@ -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
)
{
int
dev
=
iminor
(
file
->
f_path
.
dentry
->
d_inode
);
int
dev
=
iminor
(
file
_inode
(
file
)
);
unsigned
int
mask
=
0
;
sync_port
*
port
;
DEBUGPOLL
(
static
unsigned
int
prev_mask
=
0
;
);
...
...
@@ -657,7 +657,7 @@ static int sync_serial_ioctl(struct file *file,
{
int
return_val
=
0
;
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
;
reg_sser_rw_tr_cfg
tr_cfg
;
reg_sser_rw_rec_cfg
rec_cfg
;
...
...
@@ -979,7 +979,7 @@ static long sync_serial_ioctl(struct file *file,
static
ssize_t
sync_serial_write
(
struct
file
*
file
,
const
char
*
buf
,
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
);
struct
sync_port
*
port
;
int
trunc_count
;
...
...
@@ -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
,
size_t
count
,
loff_t
*
ppos
)
{
int
dev
=
iminor
(
file
->
f_path
.
dentry
->
d_inode
);
int
dev
=
iminor
(
file
_inode
(
file
)
);
int
avail
;
sync_port
*
port
;
unsigned
char
*
start
;
...
...
arch/ia64/kernel/salinfo.c
View file @
496ad9aa
...
...
@@ -301,7 +301,7 @@ salinfo_event_open(struct inode *inode, struct file *file)
static
ssize_t
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
salinfo_data
*
data
=
entry
->
data
;
char
cmd
[
32
];
...
...
@@ -463,7 +463,7 @@ salinfo_log_new_read(int cpu, struct salinfo_data *data)
static
ssize_t
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
salinfo_data
*
data
=
entry
->
data
;
u8
*
buf
;
...
...
@@ -524,7 +524,7 @@ salinfo_log_clear(struct salinfo_data *data, int cpu)
static
ssize_t
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
salinfo_data
*
data
=
entry
->
data
;
char
cmd
[
32
];
...
...
arch/mips/kernel/rtlx.c
View file @
496ad9aa
...
...
@@ -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
)
{
int
minor
;
int
minor
=
iminor
(
file_inode
(
file
))
;
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
].
lx_queue
,
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
,
loff_t
*
ppos
)
{
int
minor
=
iminor
(
file
->
f_path
.
dentry
->
d_inode
);
int
minor
=
iminor
(
file
_inode
(
file
)
);
/* data available? */
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,
static
ssize_t
file_write
(
struct
file
*
file
,
const
char
__user
*
buffer
,
size_t
count
,
loff_t
*
ppos
)
{
int
minor
;
struct
rtlx_channel
*
rt
;
minor
=
iminor
(
file
->
f_path
.
dentry
->
d_inode
);
rt
=
&
rtlx
->
channel
[
minor
];
int
minor
=
iminor
(
file_inode
(
file
));
struct
rtlx_channel
*
rt
=
&
rtlx
->
channel
[
minor
];
/* any space left... */
if
(
!
rtlx_write_poll
(
minor
))
{
...
...
arch/mips/kernel/vpe.c
View file @
496ad9aa
...
...
@@ -1149,7 +1149,7 @@ static ssize_t vpe_write(struct file *file, const char __user * buffer,
size_t
ret
=
count
;
struct
vpe
*
v
;
if
(
iminor
(
file
->
f_path
.
dentry
->
d_inode
)
!=
minor
)
if
(
iminor
(
file
_inode
(
file
)
)
!=
minor
)
return
-
ENODEV
;
v
=
get_vpe
(
tclimit
);
...
...
arch/mips/lasat/picvue_proc.c
View file @
496ad9aa
...
...
@@ -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
,
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
];
size_t
len
;
...
...
arch/powerpc/kernel/proc_powerpc.c
View file @
496ad9aa
...
...
@@ -32,7 +32,7 @@
static
loff_t
page_map_seek
(
struct
file
*
file
,
loff_t
off
,
int
whence
)
{
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
)
{
case
0
:
...
...
@@ -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
,
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
);
}
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
)
return
-
EINVAL
;
...
...
arch/powerpc/kernel/rtas_flash.c
View file @
496ad9aa
...
...
@@ -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
)
{
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
;
uf
=
(
struct
rtas_update_flash_t
*
)
dp
->
data
;
...
...
@@ -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
,
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
;
char
msg
[
RTAS_MSG_MAXLEN
];
...
...
@@ -282,7 +282,7 @@ void rtas_block_ctor(void *ptr)
static
ssize_t
rtas_flash_write
(
struct
file
*
file
,
const
char
__user
*
buffer
,
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
;
char
*
p
;
int
next_free
;
...
...
@@ -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
,
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
;
char
msg
[
RTAS_MSG_MAXLEN
];
int
msglen
;
...
...
@@ -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
,
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
;
const
char
reject_str
[]
=
"0"
;
const
char
commit_str
[]
=
"1"
;
...
...
@@ -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
,
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
;
char
msg
[
RTAS_MSG_MAXLEN
];
int
msglen
;
...
...
@@ -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
,
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
;
int
rc
;
...
...
@@ -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
)
{
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
;
args_buf
=
(
struct
rtas_validate_flash_t
*
)
dp
->
data
;
...
...
arch/powerpc/platforms/cell/spufs/coredump.c
View file @
496ad9aa
...
...
@@ -111,7 +111,7 @@ static int match_context(const void *v, struct file *file, unsigned fd)
struct
spu_context
*
ctx
;
if
(
file
->
f_op
!=
&
spufs_context_fops
)
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
)
return
0
;
return
fd
+
1
;
...
...
@@ -137,7 +137,7 @@ static struct spu_context *coredump_next_context(int *fd)
return
NULL
;
*
fd
=
n
-
1
;
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
)
...
...
arch/powerpc/platforms/cell/spufs/file.c
View file @
496ad9aa
...
...
@@ -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
)
{
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
);
if
(
!
err
)
{
mutex_lock
(
&
inode
->
i_mutex
);
...
...
@@ -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
,
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
;
int
error
=
0
,
cnt
=
0
;
...
...
@@ -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
)
{
struct
inode
*
inode
=
file
->
f_path
.
dentry
->
d_inode
;
struct
inode
*
inode
=
file
_inode
(
file
)
;
struct
spu_context
*
ctx
=
SPUFS_I
(
inode
)
->
i_ctx
;
unsigned
int
mask
=
0
;
int
rc
;
...
...
arch/powerpc/platforms/cell/spufs/inode.c
View file @
496ad9aa
...
...
@@ -368,7 +368,7 @@ spufs_assert_affinity(unsigned int flags, struct spu_gang *gang,
return
ERR_PTR
(
-
EINVAL
);
neighbor
=
get_spu_context
(
SPUFS_I
(
fil
p
->
f_dentry
->
d_inode
)
->
i_ctx
);
SPUFS_I
(
fil
e_inode
(
filp
)
)
->
i_ctx
);
if
(
!
list_empty
(
&
neighbor
->
aff_list
)
&&
!
(
neighbor
->
aff_head
)
&&
!
list_is_last
(
&
neighbor
->
aff_list
,
&
gang
->
aff_list_head
)
&&
...
...
arch/powerpc/platforms/cell/spufs/syscalls.c
View file @
496ad9aa
...
...
@@ -47,7 +47,7 @@ static long do_spu_run(struct file *filp,
if
(
filp
->
f_op
!=
&
spufs_context_fops
)
goto
out
;
i
=
SPUFS_I
(
fil
p
->
f_path
.
dentry
->
d_inode
);
i
=
SPUFS_I
(
fil
e_inode
(
filp
)
);
ret
=
spufs_run_spu
(
i
->
i_ctx
,
&
npc
,
&
status
);
if
(
put_user
(
npc
,
unpc
))
...
...
arch/powerpc/platforms/pseries/hvCall_inst.c
View file @
496ad9aa
...
...
@@ -86,7 +86,7 @@ static int hcall_inst_seq_open(struct inode *inode, struct file *file)
rc
=
seq_open
(
file
,
&
hcall_inst_seq_ops
);
seq
=
file
->
private_data
;
seq
->
private
=
file
->
f_path
.
dentry
->
d_inode
->
i_private
;
seq
->
private
=
file
_inode
(
file
)
->
i_private
;
return
rc
;
}
...
...
arch/powerpc/platforms/pseries/scanlog.c
View file @
496ad9aa
...
...
@@ -46,16 +46,12 @@ static struct proc_dir_entry *proc_ppc64_scan_log_dump; /* The proc file */
static
ssize_t
scanlog_read
(
struct
file
*
file
,
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
)
{
struct
inode
*
inode
=
file
->
f_path
.
dentry
->
d_inode
;
struct
proc_dir_entry
*
dp
;
unsigned
int
*
data
;
struct
proc_dir_entry
*
dp
=
PDE
(
file_inode
(
file
));
unsigned
int
*
data
=
(
unsigned
int
*
)
dp
->
data
;
int
status
;
unsigned
long
len
,
off
;
unsigned
int
wait_time
;
dp
=
PDE
(
inode
);
data
=
(
unsigned
int
*
)
dp
->
data
;
if
(
count
>
RTAS_DATA_BUF_SIZE
)
count
=
RTAS_DATA_BUF_SIZE
;
...
...
arch/s390/hypfs/hypfs_dbfs.c
View file @
496ad9aa
...
...
@@ -54,7 +54,7 @@ static ssize_t dbfs_read(struct file *file, char __user *buf,
if
(
*
ppos
!=
0
)
return
0
;
df
=
file
->
f_path
.
dentry
->
d_inode
->
i_private
;
df
=
file
_inode
(
file
)
->
i_private
;
mutex_lock
(
&
df
->
lock
);
if
(
!
df
->
data
)
{
data
=
hypfs_dbfs_data_alloc
(
df
);
...
...
arch/s390/hypfs/inode.c
View file @
496ad9aa
...
...
@@ -119,7 +119,7 @@ static void hypfs_evict_inode(struct inode *inode)
static
int
hypfs_open
(
struct
inode
*
inode
,
struct
file
*
filp
)
{
char
*
data
=
fil
p
->
f_path
.
dentry
->
d_inode
->
i_private
;
char
*
data
=
fil
e_inode
(
filp
)
->
i_private
;
struct
hypfs_sb_info
*
fs_info
;
if
(
filp
->
f_mode
&
FMODE_WRITE
)
{
...
...
arch/s390/kernel/debug.c
View file @
496ad9aa
...
...
@@ -611,7 +611,7 @@ debug_open(struct inode *inode, struct file *file)
debug_info_t
*
debug_info
,
*
debug_info_snapshot
;
mutex_lock
(
&
debug_mutex
);
debug_info
=
file
->
f_path
.
dentry
->
d_inode
->
i_private
;
debug_info
=
file
_inode
(
file
)
->
i_private
;
/* find debug view */
for
(
i
=
0
;
i
<
DEBUG_MAX_VIEWS
;
i
++
)
{
if
(
!
debug_info
->
views
[
i
])
...
...
arch/s390/pci/pci_debug.c
View file @
496ad9aa
...
...
@@ -99,7 +99,7 @@ static ssize_t pci_perf_seq_write(struct file *file, const char __user *ubuf,
static
int
pci_perf_seq_open
(
struct
inode
*
inode
,
struct
file
*
filp
)
{
return
single_open
(
filp
,
pci_perf_show
,
fil
p
->
f_path
.
dentry
->
d_inode
->
i_private
);
fil
e_inode
(
filp
)
->
i_private
);
}
static
const
struct
file_operations
debugfs_pci_perf_fops
=
{
...
...
@@ -121,7 +121,7 @@ static int pci_debug_show(struct seq_file *m, void *v)
static
int
pci_debug_seq_open
(
struct
inode
*
inode
,
struct
file
*
filp
)
{
return
single_open
(
filp
,
pci_debug_show
,
fil
p
->
f_path
.
dentry
->
d_inode
->
i_private
);
fil
e_inode
(
filp
)
->
i_private
);
}
static
const
struct
file_operations
debugfs_pci_debug_fops
=
{
...
...
arch/sh/mm/alignment.c
View file @
496ad9aa
...
...
@@ -140,7 +140,7 @@ static int alignment_proc_open(struct inode *inode, struct file *file)
static
ssize_t
alignment_proc_write
(
struct
file
*
file
,
const
char
__user
*
buffer
,
size_t
count
,
loff_t
*
pos
)
{
int
*
data
=
PDE
(
file
->
f_path
.
dentry
->
d_inode
)
->
data
;
int
*
data
=
PDE
(
file
_inode
(
file
)
)
->
data
;
char
mode
;
if
(
count
>
0
)
{
...
...
arch/x86/ia32/ia32_aout.c
View file @
496ad9aa
...
...
@@ -271,7 +271,7 @@ static int load_aout_binary(struct linux_binprm *bprm)
if
((
N_MAGIC
(
ex
)
!=
ZMAGIC
&&
N_MAGIC
(
ex
)
!=
OMAGIC
&&
N_MAGIC
(
ex
)
!=
QMAGIC
&&
N_MAGIC
(
ex
)
!=
NMAGIC
)
||
N_TRSIZE
(
ex
)
||
N_DRSIZE
(
ex
)
||
i_size_read
(
bprm
->
file
->
f_path
.
dentry
->
d_inode
)
<
i_size_read
(
file_inode
(
bprm
->
file
)
)
<
ex
.
a_text
+
ex
.
a_data
+
N_SYMSIZE
(
ex
)
+
N_TXTOFF
(
ex
))
{
return
-
ENOEXEC
;
}
...
...
@@ -425,12 +425,10 @@ static int load_aout_binary(struct linux_binprm *bprm)
static
int
load_aout_library
(
struct
file
*
file
)
{
struct
inode
*
inode
;
unsigned
long
bss
,
start_addr
,
len
,
error
;
int
retval
;
struct
exec
ex
;
inode
=
file
->
f_path
.
dentry
->
d_inode
;
retval
=
-
ENOEXEC
;
error
=
kernel_read
(
file
,
0
,
(
char
*
)
&
ex
,
sizeof
(
ex
));
...
...
@@ -440,7 +438,7 @@ static int load_aout_library(struct file *file)
/* We come in here for the regular a.out style of shared libraries */
if
((
N_MAGIC
(
ex
)
!=
ZMAGIC
&&
N_MAGIC
(
ex
)
!=
QMAGIC
)
||
N_TRSIZE
(
ex
)
||
N_DRSIZE
(
ex
)
||
((
ex
.
a_entry
&
0xfff
)
&&
N_MAGIC
(
ex
)
==
ZMAGIC
)
||
i_size_read
(
inode
)
<
i_size_read
(
file_inode
(
file
)
)
<
ex
.
a_text
+
ex
.
a_data
+
N_SYMSIZE
(
ex
)
+
N_TXTOFF
(
ex
))
{
goto
out
;
}
...
...
arch/x86/kernel/cpuid.c
View file @
496ad9aa
...
...
@@ -85,7 +85,7 @@ static ssize_t cpuid_read(struct file *file, char __user *buf,
{
char
__user
*
tmp
=
buf
;
struct
cpuid_regs
cmd
;
int
cpu
=
iminor
(
file
->
f_path
.
dentry
->
d_inode
);
int
cpu
=
iminor
(
file
_inode
(
file
)
);
u64
pos
=
*
ppos
;
ssize_t
bytes
=
0
;
int
err
=
0
;
...
...
@@ -116,7 +116,7 @@ static int cpuid_open(struct inode *inode, struct file *file)
unsigned
int
cpu
;
struct
cpuinfo_x86
*
c
;
cpu
=
iminor
(
file
->
f_path
.
dentry
->
d_inode
);
cpu
=
iminor
(
file
_inode
(
file
)
);
if
(
cpu
>=
nr_cpu_ids
||
!
cpu_online
(
cpu
))
return
-
ENXIO
;
/* No such CPU */
...
...
drivers/block/DAC960.c
View file @
496ad9aa
...
...
@@ -6547,7 +6547,7 @@ static ssize_t dac960_user_command_proc_write(struct file *file,
const
char
__user
*
Buffer
,
size_t
Count
,
loff_t
*
pos
)
{
DAC960_Controller_T
*
Controller
=
(
DAC960_Controller_T
*
)
PDE
(
file
->
f_path
.
dentry
->
d_inode
)
->
data
;
DAC960_Controller_T
*
Controller
=
(
DAC960_Controller_T
*
)
PDE
(
file
_inode
(
file
)
)
->
data
;
unsigned
char
CommandBuffer
[
80
];
int
Length
;
if
(
Count
>
sizeof
(
CommandBuffer
)
-
1
)
return
-
EINVAL
;
...
...
drivers/block/nbd.c
View file @
496ad9aa
...
...
@@ -625,7 +625,7 @@ static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *nbd,
return
-
EBUSY
;
file
=
fget
(
arg
);
if
(
file
)
{
struct
inode
*
inode
=
file
->
f_path
.
dentry
->
d_inode
;
struct
inode
*
inode
=
file
_inode
(
file
)
;
if
(
S_ISSOCK
(
inode
->
i_mode
))
{
nbd
->
file
=
file
;
nbd
->
sock
=
SOCKET_I
(
inode
);
...
...
drivers/char/dsp56k.c
View file @
496ad9aa
...
...
@@ -181,7 +181,7 @@ static int dsp56k_upload(u_char __user *bin, int len)
static
ssize_t
dsp56k_read
(
struct
file
*
file
,
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
)
{
struct
inode
*
inode
=
file
->
f_path
.
dentry
->
d_inode
;
struct
inode
*
inode
=
file
_inode
(
file
)
;
int
dev
=
iminor
(
inode
)
&
0x0f
;
switch
(
dev
)
...
...
@@ -244,7 +244,7 @@ static ssize_t dsp56k_read(struct file *file, char __user *buf, size_t count,
static
ssize_t
dsp56k_write
(
struct
file
*
file
,
const
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
)
{
struct
inode
*
inode
=
file
->
f_path
.
dentry
->
d_inode
;
struct
inode
*
inode
=
file
_inode
(
file
)
;
int
dev
=
iminor
(
inode
)
&
0x0f
;
switch
(
dev
)
...
...
@@ -306,7 +306,7 @@ static ssize_t dsp56k_write(struct file *file, const char __user *buf, size_t co
static
long
dsp56k_ioctl
(
struct
file
*
file
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
int
dev
=
iminor
(
file
->
f_path
.
dentry
->
d_inode
)
&
0x0f
;
int
dev
=
iminor
(
file
_inode
(
file
)
)
&
0x0f
;
void
__user
*
argp
=
(
void
__user
*
)
arg
;
switch
(
dev
)
...
...
@@ -408,7 +408,7 @@ static long dsp56k_ioctl(struct file *file, unsigned int cmd,
#if 0
static unsigned int dsp56k_poll(struct file *file, poll_table *wait)
{
int dev = iminor(file
->f_path.dentry->d_inode
) & 0x0f;
int dev = iminor(file
_inode(file)
) & 0x0f;
switch(dev)
{
...
...
drivers/char/dtlk.c
View file @
496ad9aa
...
...
@@ -125,7 +125,7 @@ static char dtlk_write_tts(char);
static
ssize_t
dtlk_read
(
struct
file
*
file
,
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
)
{
unsigned
int
minor
=
iminor
(
file
->
f_path
.
dentry
->
d_inode
);
unsigned
int
minor
=
iminor
(
file
_inode
(
file
)
);
char
ch
;
int
i
=
0
,
retries
;
...
...
@@ -177,7 +177,7 @@ static ssize_t dtlk_write(struct file *file, const char __user *buf,
}
#endif
if
(
iminor
(
file
->
f_path
.
dentry
->
d_inode
)
!=
DTLK_MINOR
)
if
(
iminor
(
file
_inode
(
file
)
)
!=
DTLK_MINOR
)
return
-
EINVAL
;
while
(
1
)
{
...
...
drivers/char/lp.c
View file @
496ad9aa
...
...
@@ -294,7 +294,7 @@ static int lp_wait_ready(int minor, int nonblock)
static
ssize_t
lp_write
(
struct
file
*
file
,
const
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
)
{
unsigned
int
minor
=
iminor
(
file
->
f_path
.
dentry
->
d_inode
);
unsigned
int
minor
=
iminor
(
file
_inode
(
file
)
);
struct
parport
*
port
=
lp_table
[
minor
].
dev
->
port
;
char
*
kbuf
=
lp_table
[
minor
].
lp_buffer
;
ssize_t
retv
=
0
;
...
...
@@ -413,7 +413,7 @@ static ssize_t lp_read(struct file * file, char __user * buf,
size_t
count
,
loff_t
*
ppos
)
{
DEFINE_WAIT
(
wait
);
unsigned
int
minor
=
iminor
(
file
->
f_path
.
dentry
->
d_inode
);
unsigned
int
minor
=
iminor
(
file
_inode
(
file
)
);
struct
parport
*
port
=
lp_table
[
minor
].
dev
->
port
;
ssize_t
retval
=
0
;
char
*
kbuf
=
lp_table
[
minor
].
lp_buffer
;
...
...
@@ -679,7 +679,7 @@ static long lp_ioctl(struct file *file, unsigned int cmd,
struct
timeval
par_timeout
;