mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
Merge branch 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
* 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (165 commits) reiserfs: Properly display mount options in /proc/mounts vfs: prevent remount read-only if pending removes vfs: count unlinked inodes vfs: protect remounting superblock read-only vfs: keep list of mounts for each superblock vfs: switch ->show_options() to struct dentry * vfs: switch ->show_path() to struct dentry * vfs: switch ->show_devname() to struct dentry * vfs: switch ->show_stats to struct dentry * switch security_path_chmod() to struct path * vfs: prefer ->dentry->d_sb to ->mnt->mnt_sb vfs: trim includes a bit switch mnt_namespace ->root to struct mount vfs: take /proc/*/mounts and friends to fs/proc_namespace.c vfs: opencode mntget() mnt_set_mountpoint() vfs: spread struct mount - remaining argument of next_mnt() vfs: move fsnotify junk to struct mount vfs: move mnt_devname vfs: move mnt_list to struct mount vfs: switch pnode.h macros to struct mount * ...
This commit is contained in:
commit
972b2c7199
476 changed files with 2588 additions and 2879 deletions
|
|
@ -1045,7 +1045,7 @@ static const struct file_operations usblp_fops = {
|
|||
.llseek = noop_llseek,
|
||||
};
|
||||
|
||||
static char *usblp_devnode(struct device *dev, mode_t *mode)
|
||||
static char *usblp_devnode(struct device *dev, umode_t *mode)
|
||||
{
|
||||
return kasprintf(GFP_KERNEL, "usb/%s", dev_name(dev));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ static struct usb_class {
|
|||
struct class *class;
|
||||
} *usb_class;
|
||||
|
||||
static char *usb_devnode(struct device *dev, mode_t *mode)
|
||||
static char *usb_devnode(struct device *dev, umode_t *mode)
|
||||
{
|
||||
struct usb_class_driver *drv;
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ static umode_t devmode = USBFS_DEFAULT_DEVMODE;
|
|||
static umode_t busmode = USBFS_DEFAULT_BUSMODE;
|
||||
static umode_t listmode = USBFS_DEFAULT_LISTMODE;
|
||||
|
||||
static int usbfs_show_options(struct seq_file *seq, struct vfsmount *mnt)
|
||||
static int usbfs_show_options(struct seq_file *seq, struct dentry *root)
|
||||
{
|
||||
if (devuid != 0)
|
||||
seq_printf(seq, ",devuid=%u", devuid);
|
||||
|
|
@ -264,21 +264,19 @@ static int remount(struct super_block *sb, int *flags, char *data)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (usbfs_mount && usbfs_mount->mnt_sb)
|
||||
if (usbfs_mount)
|
||||
update_sb(usbfs_mount->mnt_sb);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct inode *usbfs_get_inode (struct super_block *sb, int mode, dev_t dev)
|
||||
static struct inode *usbfs_get_inode (struct super_block *sb, umode_t mode, dev_t dev)
|
||||
{
|
||||
struct inode *inode = new_inode(sb);
|
||||
|
||||
if (inode) {
|
||||
inode->i_ino = get_next_ino();
|
||||
inode->i_mode = mode;
|
||||
inode->i_uid = current_fsuid();
|
||||
inode->i_gid = current_fsgid();
|
||||
inode_init_owner(inode, NULL, mode);
|
||||
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
|
||||
switch (mode & S_IFMT) {
|
||||
default:
|
||||
|
|
@ -300,7 +298,7 @@ static struct inode *usbfs_get_inode (struct super_block *sb, int mode, dev_t de
|
|||
}
|
||||
|
||||
/* SMP-safe */
|
||||
static int usbfs_mknod (struct inode *dir, struct dentry *dentry, int mode,
|
||||
static int usbfs_mknod (struct inode *dir, struct dentry *dentry, umode_t mode,
|
||||
dev_t dev)
|
||||
{
|
||||
struct inode *inode = usbfs_get_inode(dir->i_sb, mode, dev);
|
||||
|
|
@ -317,7 +315,7 @@ static int usbfs_mknod (struct inode *dir, struct dentry *dentry, int mode,
|
|||
return error;
|
||||
}
|
||||
|
||||
static int usbfs_mkdir (struct inode *dir, struct dentry *dentry, int mode)
|
||||
static int usbfs_mkdir (struct inode *dir, struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
int res;
|
||||
|
||||
|
|
@ -328,7 +326,7 @@ static int usbfs_mkdir (struct inode *dir, struct dentry *dentry, int mode)
|
|||
return res;
|
||||
}
|
||||
|
||||
static int usbfs_create (struct inode *dir, struct dentry *dentry, int mode)
|
||||
static int usbfs_create (struct inode *dir, struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
mode = (mode & S_IALLUGO) | S_IFREG;
|
||||
return usbfs_mknod (dir, dentry, mode, 0);
|
||||
|
|
@ -489,7 +487,7 @@ static int usbfs_fill_super(struct super_block *sb, void *data, int silent)
|
|||
*
|
||||
* This function handles both regular files and directories.
|
||||
*/
|
||||
static int fs_create_by_name (const char *name, mode_t mode,
|
||||
static int fs_create_by_name (const char *name, umode_t mode,
|
||||
struct dentry *parent, struct dentry **dentry)
|
||||
{
|
||||
int error = 0;
|
||||
|
|
@ -500,9 +498,8 @@ static int fs_create_by_name (const char *name, mode_t mode,
|
|||
* have around.
|
||||
*/
|
||||
if (!parent ) {
|
||||
if (usbfs_mount && usbfs_mount->mnt_sb) {
|
||||
parent = usbfs_mount->mnt_sb->s_root;
|
||||
}
|
||||
if (usbfs_mount)
|
||||
parent = usbfs_mount->mnt_root;
|
||||
}
|
||||
|
||||
if (!parent) {
|
||||
|
|
@ -514,7 +511,7 @@ static int fs_create_by_name (const char *name, mode_t mode,
|
|||
mutex_lock(&parent->d_inode->i_mutex);
|
||||
*dentry = lookup_one_len(name, parent, strlen(name));
|
||||
if (!IS_ERR(*dentry)) {
|
||||
if ((mode & S_IFMT) == S_IFDIR)
|
||||
if (S_ISDIR(mode))
|
||||
error = usbfs_mkdir (parent->d_inode, *dentry, mode);
|
||||
else
|
||||
error = usbfs_create (parent->d_inode, *dentry, mode);
|
||||
|
|
@ -525,7 +522,7 @@ static int fs_create_by_name (const char *name, mode_t mode,
|
|||
return error;
|
||||
}
|
||||
|
||||
static struct dentry *fs_create_file (const char *name, mode_t mode,
|
||||
static struct dentry *fs_create_file (const char *name, umode_t mode,
|
||||
struct dentry *parent, void *data,
|
||||
const struct file_operations *fops,
|
||||
uid_t uid, gid_t gid)
|
||||
|
|
@ -608,7 +605,7 @@ static int create_special_files (void)
|
|||
|
||||
ignore_mount = 0;
|
||||
|
||||
parent = usbfs_mount->mnt_sb->s_root;
|
||||
parent = usbfs_mount->mnt_root;
|
||||
devices_usbfs_dentry = fs_create_file ("devices",
|
||||
listmode | S_IFREG, parent,
|
||||
NULL, &usbfs_devices_fops,
|
||||
|
|
@ -662,7 +659,7 @@ static void usbfs_add_bus(struct usb_bus *bus)
|
|||
|
||||
sprintf (name, "%03d", bus->busnum);
|
||||
|
||||
parent = usbfs_mount->mnt_sb->s_root;
|
||||
parent = usbfs_mount->mnt_root;
|
||||
bus->usbfs_dentry = fs_create_file (name, busmode | S_IFDIR, parent,
|
||||
bus, NULL, busuid, busgid);
|
||||
if (bus->usbfs_dentry == NULL) {
|
||||
|
|
|
|||
|
|
@ -642,7 +642,7 @@ static struct attribute *dev_string_attrs[] = {
|
|||
NULL
|
||||
};
|
||||
|
||||
static mode_t dev_string_attrs_are_visible(struct kobject *kobj,
|
||||
static umode_t dev_string_attrs_are_visible(struct kobject *kobj,
|
||||
struct attribute *a, int n)
|
||||
{
|
||||
struct device *dev = container_of(kobj, struct device, kobj);
|
||||
|
|
@ -877,7 +877,7 @@ static struct attribute *intf_assoc_attrs[] = {
|
|||
NULL,
|
||||
};
|
||||
|
||||
static mode_t intf_assoc_attrs_are_visible(struct kobject *kobj,
|
||||
static umode_t intf_assoc_attrs_are_visible(struct kobject *kobj,
|
||||
struct attribute *a, int n)
|
||||
{
|
||||
struct device *dev = container_of(kobj, struct device, kobj);
|
||||
|
|
|
|||
|
|
@ -326,7 +326,7 @@ static const struct dev_pm_ops usb_device_pm_ops = {
|
|||
#endif /* CONFIG_PM */
|
||||
|
||||
|
||||
static char *usb_devnode(struct device *dev, mode_t *mode)
|
||||
static char *usb_devnode(struct device *dev, umode_t *mode)
|
||||
{
|
||||
struct usb_device *usb_dev;
|
||||
|
||||
|
|
|
|||
|
|
@ -734,7 +734,7 @@ static const struct file_operations iowarrior_fops = {
|
|||
.llseek = noop_llseek,
|
||||
};
|
||||
|
||||
static char *iowarrior_devnode(struct device *dev, mode_t *mode)
|
||||
static char *iowarrior_devnode(struct device *dev, umode_t *mode)
|
||||
{
|
||||
return kasprintf(GFP_KERNEL, "usb/%s", dev_name(dev));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -269,7 +269,7 @@ static const struct file_operations tower_fops = {
|
|||
.llseek = tower_llseek,
|
||||
};
|
||||
|
||||
static char *legousbtower_devnode(struct device *dev, mode_t *mode)
|
||||
static char *legousbtower_devnode(struct device *dev, umode_t *mode)
|
||||
{
|
||||
return kasprintf(GFP_KERNEL, "usb/%s", dev_name(dev));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue