Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
45063097
Commit
45063097
authored
Dec 04, 2016
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't open-code file_inode()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
e5517c2a
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
40 additions
and
46 deletions
+40
-46
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+10
-10
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
+1
-1
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+2
-2
drivers/staging/greybus/camera.c
drivers/staging/greybus/camera.c
+2
-2
drivers/staging/greybus/es2.c
drivers/staging/greybus/es2.c
+3
-3
drivers/staging/greybus/svc.c
drivers/staging/greybus/svc.c
+3
-3
drivers/staging/greybus/timesync.c
drivers/staging/greybus/timesync.c
+1
-1
drivers/target/target_core_configfs.c
drivers/target/target_core_configfs.c
+1
-1
fs/aio.c
fs/aio.c
+3
-3
fs/autofs4/inode.c
fs/autofs4/inode.c
+1
-1
fs/fcntl.c
fs/fcntl.c
+1
-1
fs/orangefs/file.c
fs/orangefs/file.c
+1
-1
fs/orangefs/orangefs-debugfs.c
fs/orangefs/orangefs-debugfs.c
+4
-2
fs/overlayfs/copy_up.c
fs/overlayfs/copy_up.c
+1
-1
kernel/audit_watch.c
kernel/audit_watch.c
+2
-2
kernel/events/core.c
kernel/events/core.c
+1
-1
kernel/locking/qspinlock_stat.h
kernel/locking/qspinlock_stat.h
+2
-10
security/smack/smack_lsm.c
security/smack/smack_lsm.c
+1
-1
No files found.
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
View file @
45063097
...
@@ -2501,7 +2501,7 @@ static void amdgpu_debugfs_remove_files(struct amdgpu_device *adev)
...
@@ -2501,7 +2501,7 @@ static void amdgpu_debugfs_remove_files(struct amdgpu_device *adev)
static
ssize_t
amdgpu_debugfs_regs_read
(
struct
file
*
f
,
char
__user
*
buf
,
static
ssize_t
amdgpu_debugfs_regs_read
(
struct
file
*
f
,
char
__user
*
buf
,
size_t
size
,
loff_t
*
pos
)
size_t
size
,
loff_t
*
pos
)
{
{
struct
amdgpu_device
*
adev
=
f
->
f_inode
->
i_private
;
struct
amdgpu_device
*
adev
=
f
ile_inode
(
f
)
->
i_private
;
ssize_t
result
=
0
;
ssize_t
result
=
0
;
int
r
;
int
r
;
bool
pm_pg_lock
,
use_bank
;
bool
pm_pg_lock
,
use_bank
;
...
@@ -2570,7 +2570,7 @@ static ssize_t amdgpu_debugfs_regs_read(struct file *f, char __user *buf,
...
@@ -2570,7 +2570,7 @@ static ssize_t amdgpu_debugfs_regs_read(struct file *f, char __user *buf,
static
ssize_t
amdgpu_debugfs_regs_write
(
struct
file
*
f
,
const
char
__user
*
buf
,
static
ssize_t
amdgpu_debugfs_regs_write
(
struct
file
*
f
,
const
char
__user
*
buf
,
size_t
size
,
loff_t
*
pos
)
size_t
size
,
loff_t
*
pos
)
{
{
struct
amdgpu_device
*
adev
=
f
->
f_inode
->
i_private
;
struct
amdgpu_device
*
adev
=
f
ile_inode
(
f
)
->
i_private
;
ssize_t
result
=
0
;
ssize_t
result
=
0
;
int
r
;
int
r
;
...
@@ -2601,7 +2601,7 @@ static ssize_t amdgpu_debugfs_regs_write(struct file *f, const char __user *buf,
...
@@ -2601,7 +2601,7 @@ static ssize_t amdgpu_debugfs_regs_write(struct file *f, const char __user *buf,
static
ssize_t
amdgpu_debugfs_regs_pcie_read
(
struct
file
*
f
,
char
__user
*
buf
,
static
ssize_t
amdgpu_debugfs_regs_pcie_read
(
struct
file
*
f
,
char
__user
*
buf
,
size_t
size
,
loff_t
*
pos
)
size_t
size
,
loff_t
*
pos
)
{
{
struct
amdgpu_device
*
adev
=
f
->
f_inode
->
i_private
;
struct
amdgpu_device
*
adev
=
f
ile_inode
(
f
)
->
i_private
;
ssize_t
result
=
0
;
ssize_t
result
=
0
;
int
r
;
int
r
;
...
@@ -2628,7 +2628,7 @@ static ssize_t amdgpu_debugfs_regs_pcie_read(struct file *f, char __user *buf,
...
@@ -2628,7 +2628,7 @@ static ssize_t amdgpu_debugfs_regs_pcie_read(struct file *f, char __user *buf,
static
ssize_t
amdgpu_debugfs_regs_pcie_write
(
struct
file
*
f
,
const
char
__user
*
buf
,
static
ssize_t
amdgpu_debugfs_regs_pcie_write
(
struct
file
*
f
,
const
char
__user
*
buf
,
size_t
size
,
loff_t
*
pos
)
size_t
size
,
loff_t
*
pos
)
{
{
struct
amdgpu_device
*
adev
=
f
->
f_inode
->
i_private
;
struct
amdgpu_device
*
adev
=
f
ile_inode
(
f
)
->
i_private
;
ssize_t
result
=
0
;
ssize_t
result
=
0
;
int
r
;
int
r
;
...
@@ -2656,7 +2656,7 @@ static ssize_t amdgpu_debugfs_regs_pcie_write(struct file *f, const char __user
...
@@ -2656,7 +2656,7 @@ static ssize_t amdgpu_debugfs_regs_pcie_write(struct file *f, const char __user
static
ssize_t
amdgpu_debugfs_regs_didt_read
(
struct
file
*
f
,
char
__user
*
buf
,
static
ssize_t
amdgpu_debugfs_regs_didt_read
(
struct
file
*
f
,
char
__user
*
buf
,
size_t
size
,
loff_t
*
pos
)
size_t
size
,
loff_t
*
pos
)
{
{
struct
amdgpu_device
*
adev
=
f
->
f_inode
->
i_private
;
struct
amdgpu_device
*
adev
=
f
ile_inode
(
f
)
->
i_private
;
ssize_t
result
=
0
;
ssize_t
result
=
0
;
int
r
;
int
r
;
...
@@ -2683,7 +2683,7 @@ static ssize_t amdgpu_debugfs_regs_didt_read(struct file *f, char __user *buf,
...
@@ -2683,7 +2683,7 @@ static ssize_t amdgpu_debugfs_regs_didt_read(struct file *f, char __user *buf,
static
ssize_t
amdgpu_debugfs_regs_didt_write
(
struct
file
*
f
,
const
char
__user
*
buf
,
static
ssize_t
amdgpu_debugfs_regs_didt_write
(
struct
file
*
f
,
const
char
__user
*
buf
,
size_t
size
,
loff_t
*
pos
)
size_t
size
,
loff_t
*
pos
)
{
{
struct
amdgpu_device
*
adev
=
f
->
f_inode
->
i_private
;
struct
amdgpu_device
*
adev
=
f
ile_inode
(
f
)
->
i_private
;
ssize_t
result
=
0
;
ssize_t
result
=
0
;
int
r
;
int
r
;
...
@@ -2711,7 +2711,7 @@ static ssize_t amdgpu_debugfs_regs_didt_write(struct file *f, const char __user
...
@@ -2711,7 +2711,7 @@ static ssize_t amdgpu_debugfs_regs_didt_write(struct file *f, const char __user
static
ssize_t
amdgpu_debugfs_regs_smc_read
(
struct
file
*
f
,
char
__user
*
buf
,
static
ssize_t
amdgpu_debugfs_regs_smc_read
(
struct
file
*
f
,
char
__user
*
buf
,
size_t
size
,
loff_t
*
pos
)
size_t
size
,
loff_t
*
pos
)
{
{
struct
amdgpu_device
*
adev
=
f
->
f_inode
->
i_private
;
struct
amdgpu_device
*
adev
=
f
ile_inode
(
f
)
->
i_private
;
ssize_t
result
=
0
;
ssize_t
result
=
0
;
int
r
;
int
r
;
...
@@ -2738,7 +2738,7 @@ static ssize_t amdgpu_debugfs_regs_smc_read(struct file *f, char __user *buf,
...
@@ -2738,7 +2738,7 @@ static ssize_t amdgpu_debugfs_regs_smc_read(struct file *f, char __user *buf,
static
ssize_t
amdgpu_debugfs_regs_smc_write
(
struct
file
*
f
,
const
char
__user
*
buf
,
static
ssize_t
amdgpu_debugfs_regs_smc_write
(
struct
file
*
f
,
const
char
__user
*
buf
,
size_t
size
,
loff_t
*
pos
)
size_t
size
,
loff_t
*
pos
)
{
{
struct
amdgpu_device
*
adev
=
f
->
f_inode
->
i_private
;
struct
amdgpu_device
*
adev
=
f
ile_inode
(
f
)
->
i_private
;
ssize_t
result
=
0
;
ssize_t
result
=
0
;
int
r
;
int
r
;
...
@@ -2766,7 +2766,7 @@ static ssize_t amdgpu_debugfs_regs_smc_write(struct file *f, const char __user *
...
@@ -2766,7 +2766,7 @@ static ssize_t amdgpu_debugfs_regs_smc_write(struct file *f, const char __user *
static
ssize_t
amdgpu_debugfs_gca_config_read
(
struct
file
*
f
,
char
__user
*
buf
,
static
ssize_t
amdgpu_debugfs_gca_config_read
(
struct
file
*
f
,
char
__user
*
buf
,
size_t
size
,
loff_t
*
pos
)
size_t
size
,
loff_t
*
pos
)
{
{
struct
amdgpu_device
*
adev
=
f
->
f_inode
->
i_private
;
struct
amdgpu_device
*
adev
=
f
ile_inode
(
f
)
->
i_private
;
ssize_t
result
=
0
;
ssize_t
result
=
0
;
int
r
;
int
r
;
uint32_t
*
config
,
no_regs
=
0
;
uint32_t
*
config
,
no_regs
=
0
;
...
@@ -2836,7 +2836,7 @@ static ssize_t amdgpu_debugfs_gca_config_read(struct file *f, char __user *buf,
...
@@ -2836,7 +2836,7 @@ static ssize_t amdgpu_debugfs_gca_config_read(struct file *f, char __user *buf,
static
ssize_t
amdgpu_debugfs_sensor_read
(
struct
file
*
f
,
char
__user
*
buf
,
static
ssize_t
amdgpu_debugfs_sensor_read
(
struct
file
*
f
,
char
__user
*
buf
,
size_t
size
,
loff_t
*
pos
)
size_t
size
,
loff_t
*
pos
)
{
{
struct
amdgpu_device
*
adev
=
f
->
f_inode
->
i_private
;
struct
amdgpu_device
*
adev
=
f
ile_inode
(
f
)
->
i_private
;
int
idx
,
r
;
int
idx
,
r
;
int32_t
value
;
int32_t
value
;
...
...
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
View file @
45063097
...
@@ -283,7 +283,7 @@ void amdgpu_ring_fini(struct amdgpu_ring *ring)
...
@@ -283,7 +283,7 @@ void amdgpu_ring_fini(struct amdgpu_ring *ring)
static
ssize_t
amdgpu_debugfs_ring_read
(
struct
file
*
f
,
char
__user
*
buf
,
static
ssize_t
amdgpu_debugfs_ring_read
(
struct
file
*
f
,
char
__user
*
buf
,
size_t
size
,
loff_t
*
pos
)
size_t
size
,
loff_t
*
pos
)
{
{
struct
amdgpu_ring
*
ring
=
(
struct
amdgpu_ring
*
)
f
->
f_inode
->
i_private
;
struct
amdgpu_ring
*
ring
=
file_inode
(
f
)
->
i_private
;
int
r
,
i
;
int
r
,
i
;
uint32_t
value
,
result
,
early
[
3
];
uint32_t
value
,
result
,
early
[
3
];
...
...
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
View file @
45063097
...
@@ -1412,7 +1412,7 @@ static const struct drm_info_list amdgpu_ttm_debugfs_list[] = {
...
@@ -1412,7 +1412,7 @@ static const struct drm_info_list amdgpu_ttm_debugfs_list[] = {
static
ssize_t
amdgpu_ttm_vram_read
(
struct
file
*
f
,
char
__user
*
buf
,
static
ssize_t
amdgpu_ttm_vram_read
(
struct
file
*
f
,
char
__user
*
buf
,
size_t
size
,
loff_t
*
pos
)
size_t
size
,
loff_t
*
pos
)
{
{
struct
amdgpu_device
*
adev
=
f
->
f_inode
->
i_private
;
struct
amdgpu_device
*
adev
=
f
ile_inode
(
f
)
->
i_private
;
ssize_t
result
=
0
;
ssize_t
result
=
0
;
int
r
;
int
r
;
...
@@ -1456,7 +1456,7 @@ static const struct file_operations amdgpu_ttm_vram_fops = {
...
@@ -1456,7 +1456,7 @@ static const struct file_operations amdgpu_ttm_vram_fops = {
static
ssize_t
amdgpu_ttm_gtt_read
(
struct
file
*
f
,
char
__user
*
buf
,
static
ssize_t
amdgpu_ttm_gtt_read
(
struct
file
*
f
,
char
__user
*
buf
,
size_t
size
,
loff_t
*
pos
)
size_t
size
,
loff_t
*
pos
)
{
{
struct
amdgpu_device
*
adev
=
f
->
f_inode
->
i_private
;
struct
amdgpu_device
*
adev
=
f
ile_inode
(
f
)
->
i_private
;
ssize_t
result
=
0
;
ssize_t
result
=
0
;
int
r
;
int
r
;
...
...
drivers/staging/greybus/camera.c
View file @
45063097
...
@@ -1091,7 +1091,7 @@ static ssize_t gb_camera_debugfs_read(struct file *file, char __user *buf,
...
@@ -1091,7 +1091,7 @@ static ssize_t gb_camera_debugfs_read(struct file *file, char __user *buf,
size_t
len
,
loff_t
*
offset
)
size_t
len
,
loff_t
*
offset
)
{
{
const
struct
gb_camera_debugfs_entry
*
op
=
file
->
private_data
;
const
struct
gb_camera_debugfs_entry
*
op
=
file
->
private_data
;
struct
gb_camera
*
gcam
=
file
->
f_inode
->
i_private
;
struct
gb_camera
*
gcam
=
file
_inode
(
file
)
->
i_private
;
struct
gb_camera_debugfs_buffer
*
buffer
;
struct
gb_camera_debugfs_buffer
*
buffer
;
ssize_t
ret
;
ssize_t
ret
;
...
@@ -1113,7 +1113,7 @@ static ssize_t gb_camera_debugfs_write(struct file *file,
...
@@ -1113,7 +1113,7 @@ static ssize_t gb_camera_debugfs_write(struct file *file,
loff_t
*
offset
)
loff_t
*
offset
)
{
{
const
struct
gb_camera_debugfs_entry
*
op
=
file
->
private_data
;
const
struct
gb_camera_debugfs_entry
*
op
=
file
->
private_data
;
struct
gb_camera
*
gcam
=
file
->
f_inode
->
i_private
;
struct
gb_camera
*
gcam
=
file
_inode
(
file
)
->
i_private
;
ssize_t
ret
;
ssize_t
ret
;
char
*
kbuf
;
char
*
kbuf
;
...
...
drivers/staging/greybus/es2.c
View file @
45063097
...
@@ -1250,7 +1250,7 @@ static int apb_log_poll(void *data)
...
@@ -1250,7 +1250,7 @@ static int apb_log_poll(void *data)
static
ssize_t
apb_log_read
(
struct
file
*
f
,
char
__user
*
buf
,
static
ssize_t
apb_log_read
(
struct
file
*
f
,
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
)
size_t
count
,
loff_t
*
ppos
)
{
{
struct
es2_ap_dev
*
es2
=
f
->
f_inode
->
i_private
;
struct
es2_ap_dev
*
es2
=
f
ile_inode
(
f
)
->
i_private
;
ssize_t
ret
;
ssize_t
ret
;
size_t
copied
;
size_t
copied
;
char
*
tmp_buf
;
char
*
tmp_buf
;
...
@@ -1304,7 +1304,7 @@ static void usb_log_disable(struct es2_ap_dev *es2)
...
@@ -1304,7 +1304,7 @@ static void usb_log_disable(struct es2_ap_dev *es2)
static
ssize_t
apb_log_enable_read
(
struct
file
*
f
,
char
__user
*
buf
,
static
ssize_t
apb_log_enable_read
(
struct
file
*
f
,
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
)
size_t
count
,
loff_t
*
ppos
)
{
{
struct
es2_ap_dev
*
es2
=
f
->
f_inode
->
i_private
;
struct
es2_ap_dev
*
es2
=
f
ile_inode
(
f
)
->
i_private
;
int
enable
=
!
IS_ERR_OR_NULL
(
es2
->
apb_log_task
);
int
enable
=
!
IS_ERR_OR_NULL
(
es2
->
apb_log_task
);
char
tmp_buf
[
3
];
char
tmp_buf
[
3
];
...
@@ -1317,7 +1317,7 @@ static ssize_t apb_log_enable_write(struct file *f, const char __user *buf,
...
@@ -1317,7 +1317,7 @@ static ssize_t apb_log_enable_write(struct file *f, const char __user *buf,
{
{
int
enable
;
int
enable
;
ssize_t
retval
;
ssize_t
retval
;
struct
es2_ap_dev
*
es2
=
f
->
f_inode
->
i_private
;
struct
es2_ap_dev
*
es2
=
f
ile_inode
(
f
)
->
i_private
;
retval
=
kstrtoint_from_user
(
buf
,
count
,
10
,
&
enable
);
retval
=
kstrtoint_from_user
(
buf
,
count
,
10
,
&
enable
);
if
(
retval
)
if
(
retval
)
...
...
drivers/staging/greybus/svc.c
View file @
45063097
...
@@ -757,7 +757,7 @@ static int gb_svc_version_request(struct gb_operation *op)
...
@@ -757,7 +757,7 @@ static int gb_svc_version_request(struct gb_operation *op)
static
ssize_t
pwr_debugfs_voltage_read
(
struct
file
*
file
,
char
__user
*
buf
,
static
ssize_t
pwr_debugfs_voltage_read
(
struct
file
*
file
,
char
__user
*
buf
,
size_t
len
,
loff_t
*
offset
)
size_t
len
,
loff_t
*
offset
)
{
{
struct
svc_debugfs_pwrmon_rail
*
pwrmon_rails
=
file
->
f_inode
->
i_private
;
struct
svc_debugfs_pwrmon_rail
*
pwrmon_rails
=
file
_inode
(
file
)
->
i_private
;
struct
gb_svc
*
svc
=
pwrmon_rails
->
svc
;
struct
gb_svc
*
svc
=
pwrmon_rails
->
svc
;
int
ret
,
desc
;
int
ret
,
desc
;
u32
value
;
u32
value
;
...
@@ -780,7 +780,7 @@ static ssize_t pwr_debugfs_voltage_read(struct file *file, char __user *buf,
...
@@ -780,7 +780,7 @@ static ssize_t pwr_debugfs_voltage_read(struct file *file, char __user *buf,
static
ssize_t
pwr_debugfs_current_read
(
struct
file
*
file
,
char
__user
*
buf
,
static
ssize_t
pwr_debugfs_current_read
(
struct
file
*
file
,
char
__user
*
buf
,
size_t
len
,
loff_t
*
offset
)
size_t
len
,
loff_t
*
offset
)
{
{
struct
svc_debugfs_pwrmon_rail
*
pwrmon_rails
=
file
->
f_inode
->
i_private
;
struct
svc_debugfs_pwrmon_rail
*
pwrmon_rails
=
file
_inode
(
file
)
->
i_private
;
struct
gb_svc
*
svc
=
pwrmon_rails
->
svc
;
struct
gb_svc
*
svc
=
pwrmon_rails
->
svc
;
int
ret
,
desc
;
int
ret
,
desc
;
u32
value
;
u32
value
;
...
@@ -803,7 +803,7 @@ static ssize_t pwr_debugfs_current_read(struct file *file, char __user *buf,
...
@@ -803,7 +803,7 @@ static ssize_t pwr_debugfs_current_read(struct file *file, char __user *buf,
static
ssize_t
pwr_debugfs_power_read
(
struct
file
*
file
,
char
__user
*
buf
,
static
ssize_t
pwr_debugfs_power_read
(
struct
file
*
file
,
char
__user
*
buf
,
size_t
len
,
loff_t
*
offset
)
size_t
len
,
loff_t
*
offset
)
{
{
struct
svc_debugfs_pwrmon_rail
*
pwrmon_rails
=
file
->
f_inode
->
i_private
;
struct
svc_debugfs_pwrmon_rail
*
pwrmon_rails
=
file
_inode
(
file
)
->
i_private
;
struct
gb_svc
*
svc
=
pwrmon_rails
->
svc
;
struct
gb_svc
*
svc
=
pwrmon_rails
->
svc
;
int
ret
,
desc
;
int
ret
,
desc
;
u32
value
;
u32
value
;
...
...
drivers/staging/greybus/timesync.c
View file @
45063097
...
@@ -921,7 +921,7 @@ EXPORT_SYMBOL_GPL(gb_timesync_schedule_asynchronous);
...
@@ -921,7 +921,7 @@ EXPORT_SYMBOL_GPL(gb_timesync_schedule_asynchronous);
static
ssize_t
gb_timesync_ping_read
(
struct
file
*
file
,
char
__user
*
ubuf
,
static
ssize_t
gb_timesync_ping_read
(
struct
file
*
file
,
char
__user
*
ubuf
,
size_t
len
,
loff_t
*
offset
,
bool
ktime
)
size_t
len
,
loff_t
*
offset
,
bool
ktime
)
{
{
struct
gb_timesync_svc
*
timesync_svc
=
file
->
f_inode
->
i_private
;
struct
gb_timesync_svc
*
timesync_svc
=
file
_inode
(
file
)
->
i_private
;
char
*
buf
;
char
*
buf
;
ssize_t
ret
=
0
;
ssize_t
ret
=
0
;
...
...
drivers/target/target_core_configfs.c
View file @
45063097
...
@@ -143,7 +143,7 @@ static ssize_t target_core_item_dbroot_store(struct config_item *item,
...
@@ -143,7 +143,7 @@ static ssize_t target_core_item_dbroot_store(struct config_item *item,
pr_err
(
"db_root: cannot open: %s
\n
"
,
db_root_stage
);
pr_err
(
"db_root: cannot open: %s
\n
"
,
db_root_stage
);
return
-
EINVAL
;
return
-
EINVAL
;
}
}
if
(
!
S_ISDIR
(
f
p
->
f_inode
->
i_mode
))
{
if
(
!
S_ISDIR
(
f
ile_inode
(
fp
)
->
i_mode
))
{
filp_close
(
fp
,
0
);
filp_close
(
fp
,
0
);
mutex_unlock
(
&
g_tf_lock
);
mutex_unlock
(
&
g_tf_lock
);
pr_err
(
"db_root: not a directory: %s
\n
"
,
db_root_stage
);
pr_err
(
"db_root: not a directory: %s
\n
"
,
db_root_stage
);
...
...
fs/aio.c
View file @
45063097
...
@@ -277,10 +277,10 @@ static void put_aio_ring_file(struct kioctx *ctx)
...
@@ -277,10 +277,10 @@ static void put_aio_ring_file(struct kioctx *ctx)
struct
address_space
*
i_mapping
;
struct
address_space
*
i_mapping
;
if
(
aio_ring_file
)
{
if
(
aio_ring_file
)
{
truncate_setsize
(
aio_ring_file
->
f_inode
,
0
);
truncate_setsize
(
file_inode
(
aio_ring_file
)
,
0
);
/* Prevent further access to the kioctx from migratepages */
/* Prevent further access to the kioctx from migratepages */
i_mapping
=
aio_ring_file
->
f_
inode
->
i_
mapping
;
i_mapping
=
aio_ring_file
->
f_mapping
;
spin_lock
(
&
i_mapping
->
private_lock
);
spin_lock
(
&
i_mapping
->
private_lock
);
i_mapping
->
private_data
=
NULL
;
i_mapping
->
private_data
=
NULL
;
ctx
->
aio_ring_file
=
NULL
;
ctx
->
aio_ring_file
=
NULL
;
...
@@ -483,7 +483,7 @@ static int aio_setup_ring(struct kioctx *ctx)
...
@@ -483,7 +483,7 @@ static int aio_setup_ring(struct kioctx *ctx)
for
(
i
=
0
;
i
<
nr_pages
;
i
++
)
{
for
(
i
=
0
;
i
<
nr_pages
;
i
++
)
{
struct
page
*
page
;
struct
page
*
page
;
page
=
find_or_create_page
(
file
->
f_
inode
->
i_
mapping
,
page
=
find_or_create_page
(
file
->
f_mapping
,
i
,
GFP_HIGHUSER
|
__GFP_ZERO
);
i
,
GFP_HIGHUSER
|
__GFP_ZERO
);
if
(
!
page
)
if
(
!
page
)
break
;
break
;
...
...
fs/autofs4/inode.c
View file @
45063097
...
@@ -94,7 +94,7 @@ static int autofs4_show_options(struct seq_file *m, struct dentry *root)
...
@@ -94,7 +94,7 @@ static int autofs4_show_options(struct seq_file *m, struct dentry *root)
seq_printf
(
m
,
",indirect"
);
seq_printf
(
m
,
",indirect"
);
#ifdef CONFIG_CHECKPOINT_RESTORE
#ifdef CONFIG_CHECKPOINT_RESTORE
if
(
sbi
->
pipe
)
if
(
sbi
->
pipe
)
seq_printf
(
m
,
",pipe_ino=%ld"
,
sbi
->
pipe
->
f_inode
->
i_ino
);
seq_printf
(
m
,
",pipe_ino=%ld"
,
file_inode
(
sbi
->
pipe
)
->
i_ino
);
else
else
seq_printf
(
m
,
",pipe_ino=-1"
);
seq_printf
(
m
,
",pipe_ino=-1"
);
#endif
#endif
...
...
fs/fcntl.c
View file @
45063097
...
@@ -52,7 +52,7 @@ static int setfl(int fd, struct file * filp, unsigned long arg)
...
@@ -52,7 +52,7 @@ static int setfl(int fd, struct file * filp, unsigned long arg)
arg
|=
O_NONBLOCK
;
arg
|=
O_NONBLOCK
;
/* Pipe packetized mode is controlled by O_DIRECT flag */
/* Pipe packetized mode is controlled by O_DIRECT flag */
if
(
!
S_ISFIFO
(
filp
->
f_
inode
->
i_mode
)
&&
(
arg
&
O_DIRECT
))
{
if
(
!
S_ISFIFO
(
inode
->
i_mode
)
&&
(
arg
&
O_DIRECT
))
{
if
(
!
filp
->
f_mapping
||
!
filp
->
f_mapping
->
a_ops
||
if
(
!
filp
->
f_mapping
||
!
filp
->
f_mapping
->
a_ops
||
!
filp
->
f_mapping
->
a_ops
->
direct_IO
)
!
filp
->
f_mapping
->
a_ops
->
direct_IO
)
return
-
EINVAL
;
return
-
EINVAL
;
...
...
fs/orangefs/file.c
View file @
45063097
...
@@ -724,7 +724,7 @@ static int orangefs_lock(struct file *filp, int cmd, struct file_lock *fl)
...
@@ -724,7 +724,7 @@ static int orangefs_lock(struct file *filp, int cmd, struct file_lock *fl)
{
{
int
rc
=
-
EINVAL
;
int
rc
=
-
EINVAL
;
if
(
ORANGEFS_SB
(
fil
p
->
f_inode
->
i_sb
)
->
flags
&
ORANGEFS_OPT_LOCAL_LOCK
)
{
if
(
ORANGEFS_SB
(
fil
e_inode
(
filp
)
->
i_sb
)
->
flags
&
ORANGEFS_OPT_LOCAL_LOCK
)
{
if
(
cmd
==
F_GETLK
)
{
if
(
cmd
==
F_GETLK
)
{
rc
=
0
;
rc
=
0
;
posix_test_lock
(
filp
,
fl
);
posix_test_lock
(
filp
,
fl
);
...
...
fs/orangefs/orangefs-debugfs.c
View file @
45063097
...
@@ -434,6 +434,7 @@ static ssize_t orangefs_debug_write(struct file *file,
...
@@ -434,6 +434,7 @@ static ssize_t orangefs_debug_write(struct file *file,
char
*
debug_string
;
char
*
debug_string
;
struct
orangefs_kernel_op_s
*
new_op
=
NULL
;
struct
orangefs_kernel_op_s
*
new_op
=
NULL
;
struct
client_debug_mask
c_mask
=
{
NULL
,
0
,
0
};
struct
client_debug_mask
c_mask
=
{
NULL
,
0
,
0
};
char
*
s
;
gossip_debug
(
GOSSIP_DEBUGFS_DEBUG
,
gossip_debug
(
GOSSIP_DEBUGFS_DEBUG
,
"orangefs_debug_write: %pD
\n
"
,
"orangefs_debug_write: %pD
\n
"
,
...
@@ -521,8 +522,9 @@ static ssize_t orangefs_debug_write(struct file *file,
...
@@ -521,8 +522,9 @@ static ssize_t orangefs_debug_write(struct file *file,
}
}
mutex_lock
(
&
orangefs_debug_lock
);
mutex_lock
(
&
orangefs_debug_lock
);
memset
(
file
->
f_inode
->
i_private
,
0
,
ORANGEFS_MAX_DEBUG_STRING_LEN
);
s
=
file_inode
(
file
)
->
i_private
;
sprintf
((
char
*
)
file
->
f_inode
->
i_private
,
"%s
\n
"
,
debug_string
);
memset
(
s
,
0
,
ORANGEFS_MAX_DEBUG_STRING_LEN
);
sprintf
(
s
,
"%s
\n
"
,
debug_string
);
mutex_unlock
(
&
orangefs_debug_lock
);
mutex_unlock
(
&
orangefs_debug_lock
);
*
ppos
+=
count
;
*
ppos
+=
count
;
...
...
fs/overlayfs/copy_up.c
View file @
45063097
...
@@ -33,7 +33,7 @@ static int ovl_check_fd(const void *data, struct file *f, unsigned int fd)
...
@@ -33,7 +33,7 @@ static int ovl_check_fd(const void *data, struct file *f, unsigned int fd)
{
{
const
struct
dentry
*
dentry
=
data
;
const
struct
dentry
*
dentry
=
data
;
if
(
f
->
f_inode
==
d_inode
(
dentry
))
if
(
f
ile_inode
(
f
)
==
d_inode
(
dentry
))
pr_warn_ratelimited
(
"overlayfs: Warning: Copying up %pD, but open R/O on fd %u which will cease to be coherent [pid=%d %s]
\n
"
,
pr_warn_ratelimited
(
"overlayfs: Warning: Copying up %pD, but open R/O on fd %u which will cease to be coherent [pid=%d %s]
\n
"
,
f
,
fd
,
current
->
pid
,
current
->
comm
);
f
,
fd
,
current
->
pid
,
current
->
comm
);
return
0
;
return
0
;
...
...
kernel/audit_watch.c
View file @
45063097
...
@@ -548,8 +548,8 @@ int audit_exe_compare(struct task_struct *tsk, struct audit_fsnotify_mark *mark)
...
@@ -548,8 +548,8 @@ int audit_exe_compare(struct task_struct *tsk, struct audit_fsnotify_mark *mark)
exe_file
=
get_task_exe_file
(
tsk
);
exe_file
=
get_task_exe_file
(
tsk
);
if
(
!
exe_file
)
if
(
!
exe_file
)
return
0
;
return
0
;
ino
=
exe_file
->
f_inode
->
i_ino
;
ino
=
file_inode
(
exe_file
)
->
i_ino
;
dev
=
exe_file
->
f_inode
->
i_sb
->
s_dev
;
dev
=
file_inode
(
exe_file
)
->
i_sb
->
s_dev
;
fput
(
exe_file
);
fput
(
exe_file
);
return
audit_mark_compare
(
mark
,
ino
,
dev
);
return
audit_mark_compare
(
mark
,
ino
,
dev
);
}
}
kernel/events/core.c
View file @
45063097
...
@@ -6701,7 +6701,7 @@ static bool perf_addr_filter_match(struct perf_addr_filter *filter,
...
@@ -6701,7 +6701,7 @@ static bool perf_addr_filter_match(struct perf_addr_filter *filter,
struct
file
*
file
,
unsigned
long
offset
,
struct
file
*
file
,
unsigned
long
offset
,
unsigned
long
size
)
unsigned
long
size
)
{
{
if
(
filter
->
inode
!=
file
->
f_inode
)
if
(
filter
->
inode
!=
file
_inode
(
file
)
)
return
false
;
return
false
;
if
(
filter
->
offset
>
offset
+
size
)
if
(
filter
->
offset
>
offset
+
size
)
...
...
kernel/locking/qspinlock_stat.h
View file @
45063097
...
@@ -108,11 +108,7 @@ static ssize_t qstat_read(struct file *file, char __user *user_buf,
...
@@ -108,11 +108,7 @@ static ssize_t qstat_read(struct file *file, char __user *user_buf,
/*
/*
* Get the counter ID stored in file->f_inode->i_private
* Get the counter ID stored in file->f_inode->i_private
*/
*/
if
(
!
file
->
f_inode
)
{
counter
=
(
long
)
file_inode
(
file
)
->
i_private
;
WARN_ON_ONCE
(
1
);
return
-
EBADF
;
}
counter
=
(
long
)(
file
->
f_inode
->
i_private
);
if
(
counter
>=
qstat_num
)
if
(
counter
>=
qstat_num
)
return
-
EBADF
;
return
-
EBADF
;
...
@@ -177,11 +173,7 @@ static ssize_t qstat_write(struct file *file, const char __user *user_buf,
...
@@ -177,11 +173,7 @@ static ssize_t qstat_write(struct file *file, const char __user *user_buf,
/*
/*
* Get the counter ID stored in file->f_inode->i_private
* Get the counter ID stored in file->f_inode->i_private
*/
*/
if
(
!
file
->
f_inode
)
{
if
((
long
)
file_inode
(
file
)
->
i_private
!=
qstat_reset_cnts
)
WARN_ON_ONCE
(
1
);
return
-
EBADF
;
}
if
((
long
)(
file
->
f_inode
->
i_private
)
!=
qstat_reset_cnts
)
return
count
;
return
count
;
for_each_possible_cpu
(
cpu
)
{
for_each_possible_cpu
(
cpu
)
{
...
...
security/smack/smack_lsm.c
View file @
45063097
...
@@ -225,7 +225,7 @@ static int smk_bu_credfile(const struct cred *cred, struct file *file,
...
@@ -225,7 +225,7 @@ static int smk_bu_credfile(const struct cred *cred, struct file *file,
{
{
struct
task_smack
*
tsp
=
cred
->
security
;
struct
task_smack
*
tsp
=
cred
->
security
;
struct
smack_known
*
sskp
=
tsp
->
smk_task
;
struct
smack_known
*
sskp
=
tsp
->
smk_task
;
struct
inode
*
inode
=
file
->
f_inode
;
struct
inode
*
inode
=
file
_inode
(
file
)
;
struct
inode_smack
*
isp
=
inode
->
i_security
;
struct
inode_smack
*
isp
=
inode
->
i_security
;
char
acc
[
SMK_NUM_ACCESS_TYPE
+
1
];
char
acc
[
SMK_NUM_ACCESS_TYPE
+
1
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment