mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull fourth vfs update from Al Viro: "d_inode() annotations from David Howells (sat in for-next since before the beginning of merge window) + four assorted fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: RCU pathwalk breakage when running into a symlink overmounting something fix I_DIO_WAKEUP definition direct-io: only inc/dec inode->i_dio_count for file systems fs/9p: fix readdir() VFS: assorted d_backing_inode() annotations VFS: fs/inode.c helpers: d_inode() annotations VFS: fs/cachefiles: d_backing_inode() annotations VFS: fs library helpers: d_inode() annotations VFS: assorted weird filesystems: d_inode() annotations VFS: normal filesystems (and lustre): d_inode() annotations VFS: security/: d_inode() annotations VFS: security/: d_backing_inode() annotations VFS: net/: d_inode() annotations VFS: net/unix: d_backing_inode() annotations VFS: kernel/: d_inode() annotations VFS: audit: d_backing_inode() annotations VFS: Fix up some ->d_inode accesses in the chelsio driver VFS: Cachefiles should perform fs modifications on the top layer only VFS: AF_UNIX sockets should call mknod on the top layer only
This commit is contained in:
commit
9ec3a646fe
343 changed files with 1877 additions and 1867 deletions
|
|
@ -157,10 +157,10 @@ static int dev_mkdir(const char *name, umode_t mode)
|
|||
if (IS_ERR(dentry))
|
||||
return PTR_ERR(dentry);
|
||||
|
||||
err = vfs_mkdir(path.dentry->d_inode, dentry, mode);
|
||||
err = vfs_mkdir(d_inode(path.dentry), dentry, mode);
|
||||
if (!err)
|
||||
/* mark as kernel-created inode */
|
||||
dentry->d_inode->i_private = &thread;
|
||||
d_inode(dentry)->i_private = &thread;
|
||||
done_path_create(&path, dentry);
|
||||
return err;
|
||||
}
|
||||
|
|
@ -207,7 +207,7 @@ static int handle_create(const char *nodename, umode_t mode, kuid_t uid,
|
|||
if (IS_ERR(dentry))
|
||||
return PTR_ERR(dentry);
|
||||
|
||||
err = vfs_mknod(path.dentry->d_inode, dentry, mode, dev->devt);
|
||||
err = vfs_mknod(d_inode(path.dentry), dentry, mode, dev->devt);
|
||||
if (!err) {
|
||||
struct iattr newattrs;
|
||||
|
||||
|
|
@ -215,12 +215,12 @@ static int handle_create(const char *nodename, umode_t mode, kuid_t uid,
|
|||
newattrs.ia_uid = uid;
|
||||
newattrs.ia_gid = gid;
|
||||
newattrs.ia_valid = ATTR_MODE|ATTR_UID|ATTR_GID;
|
||||
mutex_lock(&dentry->d_inode->i_mutex);
|
||||
mutex_lock(&d_inode(dentry)->i_mutex);
|
||||
notify_change(dentry, &newattrs, NULL);
|
||||
mutex_unlock(&dentry->d_inode->i_mutex);
|
||||
mutex_unlock(&d_inode(dentry)->i_mutex);
|
||||
|
||||
/* mark as kernel-created inode */
|
||||
dentry->d_inode->i_private = &thread;
|
||||
d_inode(dentry)->i_private = &thread;
|
||||
}
|
||||
done_path_create(&path, dentry);
|
||||
return err;
|
||||
|
|
@ -235,16 +235,16 @@ static int dev_rmdir(const char *name)
|
|||
dentry = kern_path_locked(name, &parent);
|
||||
if (IS_ERR(dentry))
|
||||
return PTR_ERR(dentry);
|
||||
if (dentry->d_inode) {
|
||||
if (dentry->d_inode->i_private == &thread)
|
||||
err = vfs_rmdir(parent.dentry->d_inode, dentry);
|
||||
if (d_really_is_positive(dentry)) {
|
||||
if (d_inode(dentry)->i_private == &thread)
|
||||
err = vfs_rmdir(d_inode(parent.dentry), dentry);
|
||||
else
|
||||
err = -EPERM;
|
||||
} else {
|
||||
err = -ENOENT;
|
||||
}
|
||||
dput(dentry);
|
||||
mutex_unlock(&parent.dentry->d_inode->i_mutex);
|
||||
mutex_unlock(&d_inode(parent.dentry)->i_mutex);
|
||||
path_put(&parent);
|
||||
return err;
|
||||
}
|
||||
|
|
@ -306,11 +306,11 @@ static int handle_remove(const char *nodename, struct device *dev)
|
|||
if (IS_ERR(dentry))
|
||||
return PTR_ERR(dentry);
|
||||
|
||||
if (dentry->d_inode) {
|
||||
if (d_really_is_positive(dentry)) {
|
||||
struct kstat stat;
|
||||
struct path p = {.mnt = parent.mnt, .dentry = dentry};
|
||||
err = vfs_getattr(&p, &stat);
|
||||
if (!err && dev_mynode(dev, dentry->d_inode, &stat)) {
|
||||
if (!err && dev_mynode(dev, d_inode(dentry), &stat)) {
|
||||
struct iattr newattrs;
|
||||
/*
|
||||
* before unlinking this node, reset permissions
|
||||
|
|
@ -321,10 +321,10 @@ static int handle_remove(const char *nodename, struct device *dev)
|
|||
newattrs.ia_mode = stat.mode & ~0777;
|
||||
newattrs.ia_valid =
|
||||
ATTR_UID|ATTR_GID|ATTR_MODE;
|
||||
mutex_lock(&dentry->d_inode->i_mutex);
|
||||
mutex_lock(&d_inode(dentry)->i_mutex);
|
||||
notify_change(dentry, &newattrs, NULL);
|
||||
mutex_unlock(&dentry->d_inode->i_mutex);
|
||||
err = vfs_unlink(parent.dentry->d_inode, dentry, NULL);
|
||||
mutex_unlock(&d_inode(dentry)->i_mutex);
|
||||
err = vfs_unlink(d_inode(parent.dentry), dentry, NULL);
|
||||
if (!err || err == -ENOENT)
|
||||
deleted = 1;
|
||||
}
|
||||
|
|
@ -332,7 +332,7 @@ static int handle_remove(const char *nodename, struct device *dev)
|
|||
err = -ENOENT;
|
||||
}
|
||||
dput(dentry);
|
||||
mutex_unlock(&parent.dentry->d_inode->i_mutex);
|
||||
mutex_unlock(&d_inode(parent.dentry)->i_mutex);
|
||||
|
||||
path_put(&parent);
|
||||
if (deleted && strchr(nodename, '/'))
|
||||
|
|
|
|||
Loading…
Reference in a new issue