mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
new helper: file_inode(file)
Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
57eccb830f
commit
496ad9aa8e
306 changed files with 696 additions and 717 deletions
|
|
@ -123,7 +123,7 @@ SYSCALL_DEFINE1(uselib, const char __user *, library)
|
|||
goto out;
|
||||
|
||||
error = -EINVAL;
|
||||
if (!S_ISREG(file->f_path.dentry->d_inode->i_mode))
|
||||
if (!S_ISREG(file_inode(file)->i_mode))
|
||||
goto exit;
|
||||
|
||||
error = -EACCES;
|
||||
|
|
@ -764,7 +764,7 @@ struct file *open_exec(const char *name)
|
|||
goto out;
|
||||
|
||||
err = -EACCES;
|
||||
if (!S_ISREG(file->f_path.dentry->d_inode->i_mode))
|
||||
if (!S_ISREG(file_inode(file)->i_mode))
|
||||
goto exit;
|
||||
|
||||
if (file->f_path.mnt->mnt_flags & MNT_NOEXEC)
|
||||
|
|
@ -1098,7 +1098,7 @@ EXPORT_SYMBOL(flush_old_exec);
|
|||
|
||||
void would_dump(struct linux_binprm *bprm, struct file *file)
|
||||
{
|
||||
if (inode_permission(file->f_path.dentry->d_inode, MAY_READ) < 0)
|
||||
if (inode_permission(file_inode(file), MAY_READ) < 0)
|
||||
bprm->interp_flags |= BINPRM_FLAGS_ENFORCE_NONDUMP;
|
||||
}
|
||||
EXPORT_SYMBOL(would_dump);
|
||||
|
|
@ -1270,7 +1270,7 @@ static int check_unsafe_exec(struct linux_binprm *bprm)
|
|||
int prepare_binprm(struct linux_binprm *bprm)
|
||||
{
|
||||
umode_t mode;
|
||||
struct inode * inode = bprm->file->f_path.dentry->d_inode;
|
||||
struct inode * inode = file_inode(bprm->file);
|
||||
int retval;
|
||||
|
||||
mode = inode->i_mode;
|
||||
|
|
|
|||
Loading…
Reference in a new issue