mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-16 14:30:06 -04:00
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs updates from Al Viro:
- Preparations of parallel lookups (the remaining main obstacle is the
need to move security_d_instantiate(); once that becomes safe, the
rest will be a matter of rather short series local to fs/*.c
- preadv2/pwritev2 series from Christoph
- assorted fixes
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (32 commits)
splice: handle zero nr_pages in splice_to_pipe()
vfs: show_vfsstat: do not ignore errors from show_devname method
dcache.c: new helper: __d_add()
don't bother with __d_instantiate(dentry, NULL)
untangle fsnotify_d_instantiate() a bit
uninline d_add()
replace d_add_unique() with saner primitive
quota: use lookup_one_len_unlocked()
cifs_get_root(): use lookup_one_len_unlocked()
nfs_lookup: don't bother with d_instantiate(dentry, NULL)
kill dentry_unhash()
ceph_fill_trace(): don't bother with d_instantiate(dn, NULL)
autofs4: don't bother with d_instantiate(dentry, NULL) in ->lookup()
configfs: move d_rehash() into configfs_create() for regular files
ceph: don't bother with d_rehash() in splice_dentry()
namei: teach lookup_slow() to skip revalidate
namei: massage lookup_slow() to be usable by lookup_one_len_unlocked()
lookup_one_len_unlocked(): use lookup_dcache()
namei: simplify invalidation logics in lookup_dcache()
namei: change calling conventions for lookup_{fast,slow} and follow_managed()
...
This commit is contained in:
@@ -499,7 +499,8 @@ struct request_queue {
|
||||
|
||||
#define QUEUE_FLAG_MQ_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \
|
||||
(1 << QUEUE_FLAG_STACKABLE) | \
|
||||
(1 << QUEUE_FLAG_SAME_COMP))
|
||||
(1 << QUEUE_FLAG_SAME_COMP) | \
|
||||
(1 << QUEUE_FLAG_POLL))
|
||||
|
||||
static inline void queue_lockdep_assert_held(struct request_queue *q)
|
||||
{
|
||||
|
||||
@@ -340,6 +340,12 @@ asmlinkage ssize_t compat_sys_preadv(compat_ulong_t fd,
|
||||
asmlinkage ssize_t compat_sys_pwritev(compat_ulong_t fd,
|
||||
const struct compat_iovec __user *vec,
|
||||
compat_ulong_t vlen, u32 pos_low, u32 pos_high);
|
||||
asmlinkage ssize_t compat_sys_preadv2(compat_ulong_t fd,
|
||||
const struct compat_iovec __user *vec,
|
||||
compat_ulong_t vlen, u32 pos_low, u32 pos_high, int flags);
|
||||
asmlinkage ssize_t compat_sys_pwritev2(compat_ulong_t fd,
|
||||
const struct compat_iovec __user *vec,
|
||||
compat_ulong_t vlen, u32 pos_low, u32 pos_high, int flags);
|
||||
|
||||
#ifdef __ARCH_WANT_COMPAT_SYS_PREADV64
|
||||
asmlinkage long compat_sys_preadv64(unsigned long fd,
|
||||
|
||||
@@ -246,6 +246,7 @@ extern struct dentry * d_alloc(struct dentry *, const struct qstr *);
|
||||
extern struct dentry * d_alloc_pseudo(struct super_block *, const struct qstr *);
|
||||
extern struct dentry * d_splice_alias(struct inode *, struct dentry *);
|
||||
extern struct dentry * d_add_ci(struct dentry *, struct inode *, struct qstr *);
|
||||
extern struct dentry * d_exact_alias(struct dentry *, struct inode *);
|
||||
extern struct dentry *d_find_any_alias(struct inode *inode);
|
||||
extern struct dentry * d_obtain_alias(struct inode *);
|
||||
extern struct dentry * d_obtain_root(struct inode *);
|
||||
@@ -272,38 +273,8 @@ extern int have_submounts(struct dentry *);
|
||||
* This adds the entry to the hash queues.
|
||||
*/
|
||||
extern void d_rehash(struct dentry *);
|
||||
|
||||
/**
|
||||
* d_add - add dentry to hash queues
|
||||
* @entry: dentry to add
|
||||
* @inode: The inode to attach to this dentry
|
||||
*
|
||||
* This adds the entry to the hash queues and initializes @inode.
|
||||
* The entry was actually filled in earlier during d_alloc().
|
||||
*/
|
||||
|
||||
static inline void d_add(struct dentry *entry, struct inode *inode)
|
||||
{
|
||||
d_instantiate(entry, inode);
|
||||
d_rehash(entry);
|
||||
}
|
||||
|
||||
/**
|
||||
* d_add_unique - add dentry to hash queues without aliasing
|
||||
* @entry: dentry to add
|
||||
* @inode: The inode to attach to this dentry
|
||||
*
|
||||
* This adds the entry to the hash queues and initializes @inode.
|
||||
* The entry was actually filled in earlier during d_alloc().
|
||||
*/
|
||||
static inline struct dentry *d_add_unique(struct dentry *entry, struct inode *inode)
|
||||
{
|
||||
struct dentry *res;
|
||||
|
||||
res = d_instantiate_unique(entry, inode);
|
||||
d_rehash(res != NULL ? res : entry);
|
||||
return res;
|
||||
}
|
||||
extern void d_add(struct dentry *, struct inode *);
|
||||
|
||||
extern void dentry_update_name_case(struct dentry *, struct qstr *);
|
||||
|
||||
|
||||
@@ -320,6 +320,7 @@ struct writeback_control;
|
||||
#define IOCB_EVENTFD (1 << 0)
|
||||
#define IOCB_APPEND (1 << 1)
|
||||
#define IOCB_DIRECT (1 << 2)
|
||||
#define IOCB_HIPRI (1 << 3)
|
||||
|
||||
struct kiocb {
|
||||
struct file *ki_filp;
|
||||
@@ -1539,11 +1540,6 @@ extern int vfs_unlink(struct inode *, struct dentry *, struct inode **);
|
||||
extern int vfs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *, struct inode **, unsigned int);
|
||||
extern int vfs_whiteout(struct inode *, struct dentry *);
|
||||
|
||||
/*
|
||||
* VFS dentry helper functions.
|
||||
*/
|
||||
extern void dentry_unhash(struct dentry *dentry);
|
||||
|
||||
/*
|
||||
* VFS file helper functions.
|
||||
*/
|
||||
@@ -1709,9 +1705,9 @@ extern ssize_t __vfs_write(struct file *, const char __user *, size_t, loff_t *)
|
||||
extern ssize_t vfs_read(struct file *, char __user *, size_t, loff_t *);
|
||||
extern ssize_t vfs_write(struct file *, const char __user *, size_t, loff_t *);
|
||||
extern ssize_t vfs_readv(struct file *, const struct iovec __user *,
|
||||
unsigned long, loff_t *);
|
||||
unsigned long, loff_t *, int);
|
||||
extern ssize_t vfs_writev(struct file *, const struct iovec __user *,
|
||||
unsigned long, loff_t *);
|
||||
unsigned long, loff_t *, int);
|
||||
extern ssize_t vfs_copy_file_range(struct file *, loff_t , struct file *,
|
||||
loff_t, size_t, unsigned int);
|
||||
extern int vfs_clone_file_range(struct file *file_in, loff_t pos_in,
|
||||
|
||||
@@ -16,15 +16,6 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/bug.h>
|
||||
|
||||
/*
|
||||
* fsnotify_d_instantiate - instantiate a dentry for inode
|
||||
*/
|
||||
static inline void fsnotify_d_instantiate(struct dentry *dentry,
|
||||
struct inode *inode)
|
||||
{
|
||||
__fsnotify_d_instantiate(dentry, inode);
|
||||
}
|
||||
|
||||
/* Notify this dentry's parent about a child's events. */
|
||||
static inline int fsnotify_parent(struct path *path, struct dentry *dentry, __u32 mask)
|
||||
{
|
||||
|
||||
@@ -290,14 +290,9 @@ static inline void __fsnotify_update_dcache_flags(struct dentry *dentry)
|
||||
/*
|
||||
* fsnotify_d_instantiate - instantiate a dentry for inode
|
||||
*/
|
||||
static inline void __fsnotify_d_instantiate(struct dentry *dentry, struct inode *inode)
|
||||
static inline void __fsnotify_d_instantiate(struct dentry *dentry)
|
||||
{
|
||||
if (!inode)
|
||||
return;
|
||||
|
||||
spin_lock(&dentry->d_lock);
|
||||
__fsnotify_update_dcache_flags(dentry);
|
||||
spin_unlock(&dentry->d_lock);
|
||||
}
|
||||
|
||||
/* called from fsnotify listeners, such as fanotify or dnotify */
|
||||
@@ -396,7 +391,7 @@ static inline void __fsnotify_vfsmount_delete(struct vfsmount *mnt)
|
||||
static inline void __fsnotify_update_dcache_flags(struct dentry *dentry)
|
||||
{}
|
||||
|
||||
static inline void __fsnotify_d_instantiate(struct dentry *dentry, struct inode *inode)
|
||||
static inline void __fsnotify_d_instantiate(struct dentry *dentry)
|
||||
{}
|
||||
|
||||
static inline u32 fsnotify_get_cookie(void)
|
||||
|
||||
@@ -31,6 +31,7 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND};
|
||||
#define LOOKUP_PARENT 0x0010
|
||||
#define LOOKUP_REVAL 0x0020
|
||||
#define LOOKUP_RCU 0x0040
|
||||
#define LOOKUP_NO_REVAL 0x0080
|
||||
|
||||
/*
|
||||
* Intent data
|
||||
|
||||
@@ -575,8 +575,14 @@ asmlinkage long sys_pwrite64(unsigned int fd, const char __user *buf,
|
||||
size_t count, loff_t pos);
|
||||
asmlinkage long sys_preadv(unsigned long fd, const struct iovec __user *vec,
|
||||
unsigned long vlen, unsigned long pos_l, unsigned long pos_h);
|
||||
asmlinkage long sys_preadv2(unsigned long fd, const struct iovec __user *vec,
|
||||
unsigned long vlen, unsigned long pos_l, unsigned long pos_h,
|
||||
int flags);
|
||||
asmlinkage long sys_pwritev(unsigned long fd, const struct iovec __user *vec,
|
||||
unsigned long vlen, unsigned long pos_l, unsigned long pos_h);
|
||||
asmlinkage long sys_pwritev2(unsigned long fd, const struct iovec __user *vec,
|
||||
unsigned long vlen, unsigned long pos_l, unsigned long pos_h,
|
||||
int flags);
|
||||
asmlinkage long sys_getcwd(char __user *buf, unsigned long size);
|
||||
asmlinkage long sys_mkdir(const char __user *pathname, umode_t mode);
|
||||
asmlinkage long sys_chdir(const char __user *filename);
|
||||
|
||||
@@ -304,4 +304,7 @@ struct fsxattr {
|
||||
#define SYNC_FILE_RANGE_WRITE 2
|
||||
#define SYNC_FILE_RANGE_WAIT_AFTER 4
|
||||
|
||||
/* flags for preadv2/pwritev2: */
|
||||
#define RWF_HIPRI 0x00000001 /* high priority request, poll if possible */
|
||||
|
||||
#endif /* _UAPI_LINUX_FS_H */
|
||||
|
||||
Reference in New Issue
Block a user