Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull misc vfs updates from Al Viro: "Assorted misc bits and pieces. There are several single-topic branches left after this (rename2 series from Miklos, current_time series from Deepa Dinamani, xattr series from Andreas, uaccess stuff from from me) and I'd prefer to send those separately" * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (39 commits) proc: switch auxv to use of __mem_open() hpfs: support FIEMAP cifs: get rid of unused arguments of CIFSSMBWrite() posix_acl: uapi header split posix_acl: xattr representation cleanups fs/aio.c: eliminate redundant loads in put_aio_ring_file fs/internal.h: add const to ns_dentry_operations declaration compat: remove compat_printk() fs/buffer.c: make __getblk_slow() static proc: unsigned file descriptors fs/file: more unsigned file descriptors fs: compat: remove redundant check of nr_segs cachefiles: Fix attempt to read i_blocks after deleting file [ver #2] cifs: don't use memcpy() to copy struct iov_iter get rid of separate multipage fault-in primitives fs: Avoid premature clearing of capabilities fs: Give dentry to inode_change_ok() instead of inode fuse: Propagate dentry down to inode_change_ok() ceph: Propagate dentry down to inode_change_ok() xfs: Propagate dentry down to inode_change_ok() ...
This commit is contained in:
@@ -73,14 +73,11 @@ int orangefs_set_acl(struct inode *inode, struct posix_acl *acl, int type)
|
||||
case ACL_TYPE_ACCESS:
|
||||
name = XATTR_NAME_POSIX_ACL_ACCESS;
|
||||
if (acl) {
|
||||
umode_t mode = inode->i_mode;
|
||||
/*
|
||||
* can we represent this with the traditional file
|
||||
* mode permission bits?
|
||||
*/
|
||||
error = posix_acl_equiv_mode(acl, &mode);
|
||||
if (error < 0) {
|
||||
gossip_err("%s: posix_acl_equiv_mode err: %d\n",
|
||||
umode_t mode;
|
||||
|
||||
error = posix_acl_update_mode(inode, &mode, &acl);
|
||||
if (error) {
|
||||
gossip_err("%s: posix_acl_update_mode err: %d\n",
|
||||
__func__,
|
||||
error);
|
||||
return error;
|
||||
@@ -90,8 +87,6 @@ int orangefs_set_acl(struct inode *inode, struct posix_acl *acl, int type)
|
||||
SetModeFlag(orangefs_inode);
|
||||
inode->i_mode = mode;
|
||||
mark_inode_dirty_sync(inode);
|
||||
if (error == 0)
|
||||
acl = NULL;
|
||||
}
|
||||
break;
|
||||
case ACL_TYPE_DEFAULT:
|
||||
|
@@ -177,8 +177,8 @@ static int orangefs_readdir(struct file *file, struct dir_context *ctx)
|
||||
}
|
||||
|
||||
gossip_debug(GOSSIP_DIR_DEBUG,
|
||||
"orangefs_readdir called on %s (pos=%llu)\n",
|
||||
dentry->d_name.name, llu(pos));
|
||||
"orangefs_readdir called on %pd (pos=%llu)\n",
|
||||
dentry, llu(pos));
|
||||
|
||||
memset(&readdir_response, 0, sizeof(readdir_response));
|
||||
|
||||
|
@@ -611,8 +611,8 @@ static int orangefs_file_mmap(struct file *file, struct vm_area_struct *vma)
|
||||
static int orangefs_file_release(struct inode *inode, struct file *file)
|
||||
{
|
||||
gossip_debug(GOSSIP_FILE_DEBUG,
|
||||
"orangefs_file_release: called on %s\n",
|
||||
file->f_path.dentry->d_name.name);
|
||||
"orangefs_file_release: called on %pD\n",
|
||||
file);
|
||||
|
||||
orangefs_flush_inode(inode);
|
||||
|
||||
|
@@ -129,8 +129,8 @@ static ssize_t orangefs_direct_IO(struct kiocb *iocb,
|
||||
struct iov_iter *iter)
|
||||
{
|
||||
gossip_debug(GOSSIP_INODE_DEBUG,
|
||||
"orangefs_direct_IO: %s\n",
|
||||
iocb->ki_filp->f_path.dentry->d_name.name);
|
||||
"orangefs_direct_IO: %pD\n",
|
||||
iocb->ki_filp);
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -216,10 +216,10 @@ int orangefs_setattr(struct dentry *dentry, struct iattr *iattr)
|
||||
struct inode *inode = dentry->d_inode;
|
||||
|
||||
gossip_debug(GOSSIP_INODE_DEBUG,
|
||||
"orangefs_setattr: called on %s\n",
|
||||
dentry->d_name.name);
|
||||
"orangefs_setattr: called on %pd\n",
|
||||
dentry);
|
||||
|
||||
ret = inode_change_ok(inode, iattr);
|
||||
ret = setattr_prepare(dentry, iattr);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
@@ -259,8 +259,8 @@ int orangefs_getattr(struct vfsmount *mnt,
|
||||
struct orangefs_inode_s *orangefs_inode = NULL;
|
||||
|
||||
gossip_debug(GOSSIP_INODE_DEBUG,
|
||||
"orangefs_getattr: called on %s\n",
|
||||
dentry->d_name.name);
|
||||
"orangefs_getattr: called on %pd\n",
|
||||
dentry);
|
||||
|
||||
ret = orangefs_inode_getattr(inode, 0, 0);
|
||||
if (ret == 0) {
|
||||
|
@@ -24,9 +24,9 @@ static int orangefs_create(struct inode *dir,
|
||||
struct inode *inode;
|
||||
int ret;
|
||||
|
||||
gossip_debug(GOSSIP_NAME_DEBUG, "%s: %s\n",
|
||||
gossip_debug(GOSSIP_NAME_DEBUG, "%s: %pd\n",
|
||||
__func__,
|
||||
dentry->d_name.name);
|
||||
dentry);
|
||||
|
||||
new_op = op_alloc(ORANGEFS_VFS_OP_CREATE);
|
||||
if (!new_op)
|
||||
@@ -43,9 +43,9 @@ static int orangefs_create(struct inode *dir,
|
||||
ret = service_operation(new_op, __func__, get_interruptible_flag(dir));
|
||||
|
||||
gossip_debug(GOSSIP_NAME_DEBUG,
|
||||
"%s: %s: handle:%pU: fsid:%d: new_op:%p: ret:%d:\n",
|
||||
"%s: %pd: handle:%pU: fsid:%d: new_op:%p: ret:%d:\n",
|
||||
__func__,
|
||||
dentry->d_name.name,
|
||||
dentry,
|
||||
&new_op->downcall.resp.create.refn.khandle,
|
||||
new_op->downcall.resp.create.refn.fs_id,
|
||||
new_op,
|
||||
@@ -57,18 +57,18 @@ static int orangefs_create(struct inode *dir,
|
||||
inode = orangefs_new_inode(dir->i_sb, dir, S_IFREG | mode, 0,
|
||||
&new_op->downcall.resp.create.refn);
|
||||
if (IS_ERR(inode)) {
|
||||
gossip_err("%s: Failed to allocate inode for file :%s:\n",
|
||||
gossip_err("%s: Failed to allocate inode for file :%pd:\n",
|
||||
__func__,
|
||||
dentry->d_name.name);
|
||||
dentry);
|
||||
ret = PTR_ERR(inode);
|
||||
goto out;
|
||||
}
|
||||
|
||||
gossip_debug(GOSSIP_NAME_DEBUG,
|
||||
"%s: Assigned inode :%pU: for file :%s:\n",
|
||||
"%s: Assigned inode :%pU: for file :%pd:\n",
|
||||
__func__,
|
||||
get_khandle_from_ino(inode),
|
||||
dentry->d_name.name);
|
||||
dentry);
|
||||
|
||||
d_instantiate(dentry, inode);
|
||||
unlock_new_inode(inode);
|
||||
@@ -76,9 +76,9 @@ static int orangefs_create(struct inode *dir,
|
||||
ORANGEFS_I(inode)->getattr_time = jiffies - 1;
|
||||
|
||||
gossip_debug(GOSSIP_NAME_DEBUG,
|
||||
"%s: dentry instantiated for %s\n",
|
||||
"%s: dentry instantiated for %pd\n",
|
||||
__func__,
|
||||
dentry->d_name.name);
|
||||
dentry);
|
||||
|
||||
SetMtimeFlag(parent);
|
||||
dir->i_mtime = dir->i_ctime = current_fs_time(dir->i_sb);
|
||||
@@ -87,9 +87,9 @@ static int orangefs_create(struct inode *dir,
|
||||
out:
|
||||
op_release(new_op);
|
||||
gossip_debug(GOSSIP_NAME_DEBUG,
|
||||
"%s: %s: returning %d\n",
|
||||
"%s: %pd: returning %d\n",
|
||||
__func__,
|
||||
dentry->d_name.name,
|
||||
dentry,
|
||||
ret);
|
||||
return ret;
|
||||
}
|
||||
@@ -115,8 +115,8 @@ static struct dentry *orangefs_lookup(struct inode *dir, struct dentry *dentry,
|
||||
* -EEXIST on O_EXCL opens, which is broken if we skip this lookup
|
||||
* in the create path)
|
||||
*/
|
||||
gossip_debug(GOSSIP_NAME_DEBUG, "%s called on %s\n",
|
||||
__func__, dentry->d_name.name);
|
||||
gossip_debug(GOSSIP_NAME_DEBUG, "%s called on %pd\n",
|
||||
__func__, dentry);
|
||||
|
||||
if (dentry->d_name.len > (ORANGEFS_NAME_MAX - 1))
|
||||
return ERR_PTR(-ENAMETOOLONG);
|
||||
@@ -169,9 +169,9 @@ static struct dentry *orangefs_lookup(struct inode *dir, struct dentry *dentry,
|
||||
|
||||
gossip_debug(GOSSIP_NAME_DEBUG,
|
||||
"orangefs_lookup: Adding *negative* dentry "
|
||||
"%p for %s\n",
|
||||
"%p for %pd\n",
|
||||
dentry,
|
||||
dentry->d_name.name);
|
||||
dentry);
|
||||
|
||||
d_add(dentry, NULL);
|
||||
res = NULL;
|
||||
@@ -224,10 +224,10 @@ static int orangefs_unlink(struct inode *dir, struct dentry *dentry)
|
||||
int ret;
|
||||
|
||||
gossip_debug(GOSSIP_NAME_DEBUG,
|
||||
"%s: called on %s\n"
|
||||
"%s: called on %pd\n"
|
||||
" (inode %pU): Parent is %pU | fs_id %d\n",
|
||||
__func__,
|
||||
dentry->d_name.name,
|
||||
dentry,
|
||||
get_khandle_from_ino(inode),
|
||||
&parent->refn.khandle,
|
||||
parent->refn.fs_id);
|
||||
@@ -326,9 +326,9 @@ static int orangefs_symlink(struct inode *dir,
|
||||
ORANGEFS_I(inode)->getattr_time = jiffies - 1;
|
||||
|
||||
gossip_debug(GOSSIP_NAME_DEBUG,
|
||||
"Inode (Symlink) %pU -> %s\n",
|
||||
"Inode (Symlink) %pU -> %pd\n",
|
||||
get_khandle_from_ino(inode),
|
||||
dentry->d_name.name);
|
||||
dentry);
|
||||
|
||||
SetMtimeFlag(parent);
|
||||
dir->i_mtime = dir->i_ctime = current_fs_time(dir->i_sb);
|
||||
@@ -390,9 +390,9 @@ static int orangefs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode
|
||||
ORANGEFS_I(inode)->getattr_time = jiffies - 1;
|
||||
|
||||
gossip_debug(GOSSIP_NAME_DEBUG,
|
||||
"Inode (Directory) %pU -> %s\n",
|
||||
"Inode (Directory) %pU -> %pd\n",
|
||||
get_khandle_from_ino(inode),
|
||||
dentry->d_name.name);
|
||||
dentry);
|
||||
|
||||
/*
|
||||
* NOTE: we have no good way to keep nlink consistent for directories
|
||||
|
@@ -428,8 +428,8 @@ static ssize_t orangefs_debug_write(struct file *file,
|
||||
struct client_debug_mask c_mask = { NULL, 0, 0 };
|
||||
|
||||
gossip_debug(GOSSIP_DEBUGFS_DEBUG,
|
||||
"orangefs_debug_write: %s\n",
|
||||
file->f_path.dentry->d_name.name);
|
||||
"orangefs_debug_write: %pD\n",
|
||||
file);
|
||||
|
||||
/*
|
||||
* Thwart users who try to jamb a ridiculous number
|
||||
|
Referens i nytt ärende
Block a user