mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
Merge tag 'vfs-7.1-rc1.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
Pull misc vfs updates from Christian Brauner:
"Features:
- coredump: add tracepoint for coredump events
- fs: hide file and bfile caches behind runtime const machinery
Fixes:
- fix architecture-specific compat_ftruncate64 implementations
- dcache: Limit the minimal number of bucket to two
- fs/omfs: reject s_sys_blocksize smaller than OMFS_DIR_START
- fs/mbcache: cancel shrink work before destroying the cache
- dcache: permit dynamic_dname()s up to NAME_MAX
Cleanups:
- remove or unexport unused fs_context infrastructure
- trivial ->setattr cleanups
- selftests/filesystems: Assume that TIOCGPTPEER is defined
- writeback: fix kernel-doc function name mismatch for wb_put_many()
- autofs: replace manual symlink buffer allocation in autofs_dir_symlink
- init/initramfs.c: trivial fix: FSM -> Finite-state machine
- fs: remove stale and duplicate forward declarations
- readdir: Introduce dirent_size()
- fs: Replace user_access_{begin/end} by scoped user access
- kernel: acct: fix duplicate word in comment
- fs: write a better comment in step_into() concerning .mnt assignment
- fs: attr: fix comment formatting and spelling issues"
* tag 'vfs-7.1-rc1.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: (28 commits)
dcache: permit dynamic_dname()s up to NAME_MAX
fs: attr: fix comment formatting and spelling issues
fs: hide file and bfile caches behind runtime const machinery
fs: write a better comment in step_into() concerning .mnt assignment
proc: rename proc_notify_change to proc_setattr
proc: rename proc_setattr to proc_nochmod_setattr
affs: rename affs_notify_change to affs_setattr
adfs: rename adfs_notify_change to adfs_setattr
hfs: update comments on hfs_inode_setattr
kernel: acct: fix duplicate word in comment
fs: Replace user_access_{begin/end} by scoped user access
readdir: Introduce dirent_size()
coredump: add tracepoint for coredump events
fs: remove do_sys_truncate
fs: pass on FTRUNCATE_* flags to do_truncate
fs: fix archiecture-specific compat_ftruncate64
fs: remove stale and duplicate forward declarations
init/initramfs.c: trivial fix: FSM -> Finite-state machine
autofs: replace manual symlink buffer allocation in autofs_dir_symlink
fs/mbcache: cancel shrink work before destroying the cache
...
This commit is contained in:
@@ -647,9 +647,7 @@ The members are as follows:
|
||||
fs_param_is_u64 64-bit unsigned int result->uint_64
|
||||
fs_param_is_enum Enum value name result->uint_32
|
||||
fs_param_is_string Arbitrary string param->string
|
||||
fs_param_is_blob Binary blob param->blob
|
||||
fs_param_is_blockdev Blockdev path * Needs lookup
|
||||
fs_param_is_path Path * Needs lookup
|
||||
fs_param_is_fd File descriptor result->int_32
|
||||
fs_param_is_uid User ID (u32) result->uid
|
||||
fs_param_is_gid Group ID (u32) result->gid
|
||||
@@ -681,9 +679,7 @@ The members are as follows:
|
||||
fsparam_u64() fs_param_is_u64
|
||||
fsparam_enum() fs_param_is_enum
|
||||
fsparam_string() fs_param_is_string
|
||||
fsparam_blob() fs_param_is_blob
|
||||
fsparam_bdev() fs_param_is_blockdev
|
||||
fsparam_path() fs_param_is_path
|
||||
fsparam_fd() fs_param_is_fd
|
||||
fsparam_uid() fs_param_is_uid
|
||||
fsparam_gid() fs_param_is_gid
|
||||
|
||||
@@ -89,7 +89,7 @@ COMPAT_SYSCALL_DEFINE4(aarch32_truncate64, const char __user *, pathname,
|
||||
COMPAT_SYSCALL_DEFINE4(aarch32_ftruncate64, unsigned int, fd, u32, __pad,
|
||||
arg_u32p(length))
|
||||
{
|
||||
return ksys_ftruncate(fd, arg_u64(length));
|
||||
return ksys_ftruncate(fd, arg_u64(length), FTRUNCATE_LFS);
|
||||
}
|
||||
|
||||
COMPAT_SYSCALL_DEFINE5(aarch32_readahead, int, fd, u32, __pad,
|
||||
|
||||
@@ -60,7 +60,7 @@ SYSCALL_DEFINE4(32_truncate64, const char __user *, path,
|
||||
SYSCALL_DEFINE4(32_ftruncate64, unsigned long, fd, unsigned long, __dummy,
|
||||
unsigned long, a2, unsigned long, a3)
|
||||
{
|
||||
return ksys_ftruncate(fd, merge_64(a2, a3));
|
||||
return ksys_ftruncate(fd, merge_64(a2, a3), FTRUNCATE_LFS);
|
||||
}
|
||||
|
||||
SYSCALL_DEFINE5(32_llseek, unsigned int, fd, unsigned int, offset_high,
|
||||
|
||||
@@ -216,7 +216,7 @@ asmlinkage long parisc_truncate64(const char __user * path,
|
||||
asmlinkage long parisc_ftruncate64(unsigned int fd,
|
||||
unsigned int high, unsigned int low)
|
||||
{
|
||||
return ksys_ftruncate(fd, (long)high << 32 | low);
|
||||
return ksys_ftruncate(fd, (long)high << 32 | low, FTRUNCATE_LFS);
|
||||
}
|
||||
|
||||
/* stubs for the benefit of the syscall_table since truncate64 and truncate
|
||||
@@ -227,7 +227,7 @@ asmlinkage long sys_truncate64(const char __user * path, unsigned long length)
|
||||
}
|
||||
asmlinkage long sys_ftruncate64(unsigned int fd, unsigned long length)
|
||||
{
|
||||
return ksys_ftruncate(fd, length);
|
||||
return ksys_ftruncate(fd, length, FTRUNCATE_LFS);
|
||||
}
|
||||
asmlinkage long sys_fcntl64(unsigned int fd, unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
|
||||
@@ -101,7 +101,7 @@ PPC32_SYSCALL_DEFINE4(ppc_ftruncate64,
|
||||
unsigned int, fd, u32, reg4,
|
||||
unsigned long, len1, unsigned long, len2)
|
||||
{
|
||||
return ksys_ftruncate(fd, merge_64(len1, len2));
|
||||
return ksys_ftruncate(fd, merge_64(len1, len2), FTRUNCATE_LFS);
|
||||
}
|
||||
|
||||
PPC32_SYSCALL_DEFINE6(ppc32_fadvise64,
|
||||
|
||||
@@ -58,7 +58,7 @@ COMPAT_SYSCALL_DEFINE3(truncate64, const char __user *, path, u32, high, u32, lo
|
||||
|
||||
COMPAT_SYSCALL_DEFINE3(ftruncate64, unsigned int, fd, u32, high, u32, low)
|
||||
{
|
||||
return ksys_ftruncate(fd, ((u64)high << 32) | low);
|
||||
return ksys_ftruncate(fd, ((u64)high << 32) | low, FTRUNCATE_LFS);
|
||||
}
|
||||
|
||||
static int cp_compat_stat64(struct kstat *stat,
|
||||
|
||||
@@ -61,7 +61,8 @@ SYSCALL_DEFINE3(ia32_truncate64, const char __user *, filename,
|
||||
SYSCALL_DEFINE3(ia32_ftruncate64, unsigned int, fd,
|
||||
unsigned long, offset_low, unsigned long, offset_high)
|
||||
{
|
||||
return ksys_ftruncate(fd, ((loff_t) offset_high << 32) | offset_low);
|
||||
return ksys_ftruncate(fd, ((loff_t) offset_high << 32) | offset_low,
|
||||
FTRUNCATE_LFS);
|
||||
}
|
||||
|
||||
/* warning: next two assume little endian */
|
||||
|
||||
+2
-2
@@ -144,8 +144,8 @@ struct adfs_discmap {
|
||||
/* Inode stuff */
|
||||
struct inode *adfs_iget(struct super_block *sb, struct object_info *obj);
|
||||
int adfs_write_inode(struct inode *inode, struct writeback_control *wbc);
|
||||
int adfs_notify_change(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct iattr *attr);
|
||||
int adfs_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct iattr *attr);
|
||||
|
||||
/* map.c */
|
||||
int adfs_map_lookup(struct super_block *sb, u32 frag_id, unsigned int offset);
|
||||
|
||||
+1
-1
@@ -454,5 +454,5 @@ adfs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags)
|
||||
*/
|
||||
const struct inode_operations adfs_dir_inode_operations = {
|
||||
.lookup = adfs_lookup,
|
||||
.setattr = adfs_notify_change,
|
||||
.setattr = adfs_setattr,
|
||||
};
|
||||
|
||||
+1
-1
@@ -32,5 +32,5 @@ const struct file_operations adfs_file_operations = {
|
||||
};
|
||||
|
||||
const struct inode_operations adfs_file_inode_operations = {
|
||||
.setattr = adfs_notify_change,
|
||||
.setattr = adfs_setattr,
|
||||
};
|
||||
|
||||
+2
-4
@@ -299,8 +299,7 @@ out:
|
||||
* later.
|
||||
*/
|
||||
int
|
||||
adfs_notify_change(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct iattr *attr)
|
||||
adfs_setattr(struct mnt_idmap *idmap, struct dentry *dentry, struct iattr *attr)
|
||||
{
|
||||
struct inode *inode = d_inode(dentry);
|
||||
struct super_block *sb = inode->i_sb;
|
||||
@@ -355,8 +354,7 @@ out:
|
||||
|
||||
/*
|
||||
* write an existing inode back to the directory, and therefore the disk.
|
||||
* The adfs-specific inode data has already been updated by
|
||||
* adfs_notify_change()
|
||||
* The adfs-specific inode data has already been updated by * adfs_setattr().
|
||||
*/
|
||||
int adfs_write_inode(struct inode *inode, struct writeback_control *wbc)
|
||||
{
|
||||
|
||||
+1
-1
@@ -186,7 +186,7 @@ extern int affs_rename2(struct mnt_idmap *idmap,
|
||||
/* inode.c */
|
||||
|
||||
extern struct inode *affs_new_inode(struct inode *dir);
|
||||
extern int affs_notify_change(struct mnt_idmap *idmap,
|
||||
extern int affs_setattr(struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, struct iattr *attr);
|
||||
extern void affs_evict_inode(struct inode *inode);
|
||||
extern struct inode *affs_iget(struct super_block *sb,
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@ const struct inode_operations affs_dir_inode_operations = {
|
||||
.mkdir = affs_mkdir,
|
||||
.rmdir = affs_rmdir,
|
||||
.rename = affs_rename2,
|
||||
.setattr = affs_notify_change,
|
||||
.setattr = affs_setattr,
|
||||
};
|
||||
|
||||
static int
|
||||
|
||||
+1
-1
@@ -1016,5 +1016,5 @@ const struct file_operations affs_file_operations = {
|
||||
};
|
||||
|
||||
const struct inode_operations affs_file_inode_operations = {
|
||||
.setattr = affs_notify_change,
|
||||
.setattr = affs_setattr,
|
||||
};
|
||||
|
||||
+2
-3
@@ -213,13 +213,12 @@ affs_write_inode(struct inode *inode, struct writeback_control *wbc)
|
||||
}
|
||||
|
||||
int
|
||||
affs_notify_change(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct iattr *attr)
|
||||
affs_setattr(struct mnt_idmap *idmap, struct dentry *dentry, struct iattr *attr)
|
||||
{
|
||||
struct inode *inode = d_inode(dentry);
|
||||
int error;
|
||||
|
||||
pr_debug("notify_change(%llu,0x%x)\n", inode->i_ino, attr->ia_valid);
|
||||
pr_debug("setattr(%llu,0x%x)\n", inode->i_ino, attr->ia_valid);
|
||||
|
||||
error = setattr_prepare(&nop_mnt_idmap, dentry, attr);
|
||||
if (error)
|
||||
|
||||
+1
-1
@@ -71,5 +71,5 @@ const struct address_space_operations affs_symlink_aops = {
|
||||
|
||||
const struct inode_operations affs_symlink_inode_operations = {
|
||||
.get_link = page_get_link,
|
||||
.setattr = affs_notify_change,
|
||||
.setattr = affs_setattr,
|
||||
};
|
||||
|
||||
@@ -46,8 +46,8 @@ int setattr_should_drop_sgid(struct mnt_idmap *idmap,
|
||||
EXPORT_SYMBOL(setattr_should_drop_sgid);
|
||||
|
||||
/**
|
||||
* setattr_should_drop_suidgid - determine whether the set{g,u}id bit needs to
|
||||
* be dropped
|
||||
* setattr_should_drop_suidgid - determine whether the set{g,u}id bit
|
||||
* needs to be dropped
|
||||
* @idmap: idmap of the mount @inode was found from
|
||||
* @inode: inode to check
|
||||
*
|
||||
@@ -165,7 +165,7 @@ int setattr_prepare(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
unsigned int ia_valid = attr->ia_valid;
|
||||
|
||||
/*
|
||||
* First check size constraints. These can't be overriden using
|
||||
* First check size constraints. These can't be overridden using
|
||||
* ATTR_FORCE.
|
||||
*/
|
||||
if (ia_valid & ATTR_SIZE) {
|
||||
|
||||
+3
-5
@@ -7,6 +7,7 @@
|
||||
|
||||
#include <linux/capability.h>
|
||||
#include <linux/compat.h>
|
||||
#include <linux/string.h>
|
||||
|
||||
#include "autofs_i.h"
|
||||
|
||||
@@ -578,7 +579,6 @@ static int autofs_dir_symlink(struct mnt_idmap *idmap,
|
||||
struct autofs_info *ino = autofs_dentry_ino(dentry);
|
||||
struct autofs_info *p_ino;
|
||||
struct inode *inode;
|
||||
size_t size = strlen(symname);
|
||||
char *cp;
|
||||
|
||||
pr_debug("%s <- %pd\n", symname, dentry);
|
||||
@@ -589,19 +589,17 @@ static int autofs_dir_symlink(struct mnt_idmap *idmap,
|
||||
|
||||
autofs_del_active(dentry);
|
||||
|
||||
cp = kmalloc(size + 1, GFP_KERNEL);
|
||||
cp = kstrdup(symname, GFP_KERNEL);
|
||||
if (!cp)
|
||||
return -ENOMEM;
|
||||
|
||||
strcpy(cp, symname);
|
||||
|
||||
inode = autofs_get_inode(dir->i_sb, S_IFLNK | 0555);
|
||||
if (!inode) {
|
||||
kfree(cp);
|
||||
return -ENOMEM;
|
||||
}
|
||||
inode->i_private = cp;
|
||||
inode->i_size = size;
|
||||
inode->i_size = strlen(cp);
|
||||
|
||||
d_make_persistent(dentry, inode);
|
||||
p_ino = autofs_dentry_ino(dentry->d_parent);
|
||||
|
||||
@@ -63,6 +63,9 @@
|
||||
|
||||
#include <trace/events/sched.h>
|
||||
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include <trace/events/coredump.h>
|
||||
|
||||
static bool dump_vma_snapshot(struct coredump_params *cprm);
|
||||
static void free_vma_snapshot(struct coredump_params *cprm);
|
||||
|
||||
@@ -1090,6 +1093,8 @@ static inline bool coredump_skip(const struct coredump_params *cprm,
|
||||
static void do_coredump(struct core_name *cn, struct coredump_params *cprm,
|
||||
size_t **argv, int *argc, const struct linux_binfmt *binfmt)
|
||||
{
|
||||
trace_coredump(cprm->siginfo->si_signo);
|
||||
|
||||
if (!coredump_parse(cn, cprm, argv, argc)) {
|
||||
coredump_report_failure("format_corename failed, aborting core");
|
||||
return;
|
||||
|
||||
+6
-5
@@ -301,18 +301,19 @@ EXPORT_SYMBOL(d_path);
|
||||
char *dynamic_dname(char *buffer, int buflen, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
char temp[64];
|
||||
char *start;
|
||||
int sz;
|
||||
|
||||
va_start(args, fmt);
|
||||
sz = vsnprintf(temp, sizeof(temp), fmt, args) + 1;
|
||||
sz = vsnprintf(buffer, buflen, fmt, args) + 1;
|
||||
va_end(args);
|
||||
|
||||
if (sz > sizeof(temp) || sz > buflen)
|
||||
if (sz > NAME_MAX || sz > buflen)
|
||||
return ERR_PTR(-ENAMETOOLONG);
|
||||
|
||||
buffer += buflen - sz;
|
||||
return memcpy(buffer, temp, sz);
|
||||
/* Move the formatted d_name to the end of the buffer. */
|
||||
start = buffer + (buflen - sz);
|
||||
return memmove(start, buffer, sz);
|
||||
}
|
||||
|
||||
char *simple_dname(struct dentry *dentry, char *buffer, int buflen)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user