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
此提交包含在:
@@ -714,7 +714,7 @@ void tomoyo_get_attributes(struct tomoyo_obj_info *obj)
|
||||
dentry = dget_parent(dentry);
|
||||
break;
|
||||
}
|
||||
inode = dentry->d_inode;
|
||||
inode = d_backing_inode(dentry);
|
||||
if (inode) {
|
||||
struct tomoyo_mini_stat *stat = &obj->stat[i];
|
||||
stat->uid = inode->i_uid;
|
||||
|
@@ -97,7 +97,7 @@ static char *tomoyo_get_absolute_path(const struct path *path, char * const buff
|
||||
/* go to whatever namespace root we are under */
|
||||
pos = d_absolute_path(path, buffer, buflen - 1);
|
||||
if (!IS_ERR(pos) && *pos == '/' && pos[1]) {
|
||||
struct inode *inode = path->dentry->d_inode;
|
||||
struct inode *inode = d_backing_inode(path->dentry);
|
||||
if (inode && S_ISDIR(inode->i_mode)) {
|
||||
buffer[buflen - 2] = '/';
|
||||
buffer[buflen - 1] = '\0';
|
||||
@@ -125,7 +125,7 @@ static char *tomoyo_get_dentry_path(struct dentry *dentry, char * const buffer,
|
||||
if (buflen >= 256) {
|
||||
pos = dentry_path_raw(dentry, buffer, buflen - 1);
|
||||
if (!IS_ERR(pos) && *pos == '/' && pos[1]) {
|
||||
struct inode *inode = dentry->d_inode;
|
||||
struct inode *inode = d_backing_inode(dentry);
|
||||
if (inode && S_ISDIR(inode->i_mode)) {
|
||||
buffer[buflen - 2] = '/';
|
||||
buffer[buflen - 1] = '\0';
|
||||
@@ -168,7 +168,7 @@ static char *tomoyo_get_local_path(struct dentry *dentry, char * const buffer,
|
||||
if (!MAJOR(sb->s_dev))
|
||||
goto prepend_filesystem_name;
|
||||
{
|
||||
struct inode *inode = sb->s_root->d_inode;
|
||||
struct inode *inode = d_backing_inode(sb->s_root);
|
||||
/*
|
||||
* Use filesystem name if filesystem does not support rename()
|
||||
* operation.
|
||||
@@ -219,7 +219,7 @@ out:
|
||||
static char *tomoyo_get_socket_name(const struct path *path, char * const buffer,
|
||||
const int buflen)
|
||||
{
|
||||
struct inode *inode = path->dentry->d_inode;
|
||||
struct inode *inode = d_backing_inode(path->dentry);
|
||||
struct socket *sock = inode ? SOCKET_I(inode) : NULL;
|
||||
struct sock *sk = sock ? sock->sk : NULL;
|
||||
if (sk) {
|
||||
@@ -277,7 +277,7 @@ char *tomoyo_realpath_from_path(const struct path *path)
|
||||
pos = dentry->d_op->d_dname(dentry, buf, buf_len - 1);
|
||||
goto encode;
|
||||
}
|
||||
inode = sb->s_root->d_inode;
|
||||
inode = d_backing_inode(sb->s_root);
|
||||
/*
|
||||
* Get local name for filesystems without rename() operation
|
||||
* or dentry without vfsmount.
|
||||
|
新增問題並參考
封鎖使用者