mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
Revert "ANDROID: vfs: Add permission2 for filesystems with per mount permissions"
This reverts commit 4fd07efd90 as it is no
longer needed because sdcardfs is gone.
Bug: 157700134
Cc: Daniel Rosenberg <[email protected]>
Cc: Amit Pundir <[email protected]>
Cc: Alistair Strachan <[email protected]>
Cc: Yongqin Liu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Change-Id: Ic48212d19abc161e6f77b1bd659878e20a830448
This commit is contained in:
parent
74594e1ba5
commit
750140e3c4
11 changed files with 72 additions and 168 deletions
14
ipc/mqueue.c
14
ipc/mqueue.c
|
|
@ -785,7 +785,7 @@ static void remove_notification(struct mqueue_inode_info *info)
|
|||
info->notify_user_ns = NULL;
|
||||
}
|
||||
|
||||
static int prepare_open(struct vfsmount *mnt, struct dentry *dentry, int oflag, int ro,
|
||||
static int prepare_open(struct dentry *dentry, int oflag, int ro,
|
||||
umode_t mode, struct filename *name,
|
||||
struct mq_attr *attr)
|
||||
{
|
||||
|
|
@ -799,7 +799,7 @@ static int prepare_open(struct vfsmount *mnt, struct dentry *dentry, int oflag,
|
|||
if (ro)
|
||||
return ro;
|
||||
audit_inode_parent_hidden(name, dentry->d_parent);
|
||||
return vfs_mkobj2(mnt, dentry, mode & ~current_umask(),
|
||||
return vfs_mkobj(dentry, mode & ~current_umask(),
|
||||
mqueue_create_attr, attr);
|
||||
}
|
||||
/* it already existed */
|
||||
|
|
@ -809,7 +809,7 @@ static int prepare_open(struct vfsmount *mnt, struct dentry *dentry, int oflag,
|
|||
if ((oflag & O_ACCMODE) == (O_RDWR | O_WRONLY))
|
||||
return -EINVAL;
|
||||
acc = oflag2acc[oflag & O_ACCMODE];
|
||||
return inode_permission2(mnt, d_inode(dentry), acc);
|
||||
return inode_permission(d_inode(dentry), acc);
|
||||
}
|
||||
|
||||
static int do_mq_open(const char __user *u_name, int oflag, umode_t mode,
|
||||
|
|
@ -833,13 +833,13 @@ static int do_mq_open(const char __user *u_name, int oflag, umode_t mode,
|
|||
|
||||
ro = mnt_want_write(mnt); /* we'll drop it in any case */
|
||||
inode_lock(d_inode(root));
|
||||
path.dentry = lookup_one_len2(name->name, mnt, root, strlen(name->name));
|
||||
path.dentry = lookup_one_len(name->name, root, strlen(name->name));
|
||||
if (IS_ERR(path.dentry)) {
|
||||
error = PTR_ERR(path.dentry);
|
||||
goto out_putfd;
|
||||
}
|
||||
path.mnt = mntget(mnt);
|
||||
error = prepare_open(path.mnt, path.dentry, oflag, ro, mode, name, attr);
|
||||
error = prepare_open(path.dentry, oflag, ro, mode, name, attr);
|
||||
if (!error) {
|
||||
struct file *file = dentry_open(&path, oflag, current_cred());
|
||||
if (!IS_ERR(file))
|
||||
|
|
@ -889,7 +889,7 @@ SYSCALL_DEFINE1(mq_unlink, const char __user *, u_name)
|
|||
if (err)
|
||||
goto out_name;
|
||||
inode_lock_nested(d_inode(mnt->mnt_root), I_MUTEX_PARENT);
|
||||
dentry = lookup_one_len2(name->name, mnt, mnt->mnt_root,
|
||||
dentry = lookup_one_len(name->name, mnt->mnt_root,
|
||||
strlen(name->name));
|
||||
if (IS_ERR(dentry)) {
|
||||
err = PTR_ERR(dentry);
|
||||
|
|
@ -901,7 +901,7 @@ SYSCALL_DEFINE1(mq_unlink, const char __user *, u_name)
|
|||
err = -ENOENT;
|
||||
} else {
|
||||
ihold(inode);
|
||||
err = vfs_unlink2(mnt, d_inode(dentry->d_parent), dentry, NULL);
|
||||
err = vfs_unlink(d_inode(dentry->d_parent), dentry, NULL);
|
||||
}
|
||||
dput(dentry);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue