Skip to content

Commit 10effcb

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: FS: lookup_mnt() is only used in the core fs routines now bfs: fix bitmap size argument to find_first_zero_bit() fs: Use BUG_ON(!mnt) at dentry_open(). fs: devpts_pty_new() return -ENOMEM if dentry allocation failed nfs: lock() vs unlock() typo pstore: fix leaking ->i_private introduce sys_syncfs to sync a single file system Small typo fix... Filesystem: fifo: Fixed coding style issue. fs/inode: Fix kernel-doc format for inode_init_owner select: remove unused MAX_SELECT_SECONDS vfs: cleanup do_vfs_ioctl()
2 parents c3ca48f + 0f60f24 commit 10effcb

20 files changed

Lines changed: 67 additions & 51 deletions

File tree

‎arch/x86/ia32/ia32entry.S‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -847,4 +847,5 @@ ia32_sys_call_table:
847847
.quad sys_name_to_handle_at
848848
.quad compat_sys_open_by_handle_at
849849
.quad compat_sys_clock_adjtime
850+
.quad sys_syncfs
850851
ia32_syscall_end:

‎arch/x86/include/asm/unistd_32.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,10 +349,11 @@
349349
#define __NR_name_to_handle_at 341
350350
#define __NR_open_by_handle_at 342
351351
#define __NR_clock_adjtime 343
352+
#define __NR_syncfs 344
352353

353354
#ifdef __KERNEL__
354355

355-
#define NR_syscalls 344
356+
#define NR_syscalls 345
356357

357358
#define __ARCH_WANT_IPC_PARSE_VERSION
358359
#define __ARCH_WANT_OLD_READDIR

‎arch/x86/include/asm/unistd_64.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,8 @@ __SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at)
675675
__SYSCALL(__NR_open_by_handle_at, sys_open_by_handle_at)
676676
#define __NR_clock_adjtime 305
677677
__SYSCALL(__NR_clock_adjtime, sys_clock_adjtime)
678+
#define __NR_syncfs 306
679+
__SYSCALL(__NR_syncfs, sys_syncfs)
678680

679681
#ifndef __NO_STUBS
680682
#define __ARCH_WANT_OLD_READDIR

‎arch/x86/kernel/syscall_table_32.S‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,3 +343,4 @@ ENTRY(sys_call_table)
343343
.long sys_name_to_handle_at
344344
.long sys_open_by_handle_at
345345
.long sys_clock_adjtime
346+
.long sys_syncfs

‎fs/bfs/dir.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ static int bfs_create(struct inode *dir, struct dentry *dentry, int mode,
9797
if (!inode)
9898
return -ENOSPC;
9999
mutex_lock(&info->bfs_lock);
100-
ino = find_first_zero_bit(info->si_imap, info->si_lasti);
100+
ino = find_first_zero_bit(info->si_imap, info->si_lasti + 1);
101101
if (ino > info->si_lasti) {
102102
mutex_unlock(&info->bfs_lock);
103103
iput(inode);

‎fs/compat.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1671,9 +1671,6 @@ int compat_set_fd_set(unsigned long nr, compat_ulong_t __user *ufdset,
16711671
* Update: ERESTARTSYS breaks at least the xview clock binary, so
16721672
* I'm trying ERESTARTNOHAND which restart only when you want to.
16731673
*/
1674-
#define MAX_SELECT_SECONDS \
1675-
((unsigned long) (MAX_SCHEDULE_TIMEOUT / HZ)-1)
1676-
16771674
int compat_core_sys_select(int n, compat_ulong_t __user *inp,
16781675
compat_ulong_t __user *outp, compat_ulong_t __user *exp,
16791676
struct timespec *end_time)

‎fs/devpts/inode.c‎

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,7 @@ int devpts_pty_new(struct inode *ptmx_inode, struct tty_struct *tty)
479479
struct dentry *root = sb->s_root;
480480
struct pts_fs_info *fsi = DEVPTS_SB(sb);
481481
struct pts_mount_opts *opts = &fsi->mount_opts;
482+
int ret = 0;
482483
char s[12];
483484

484485
/* We're supposed to be given the slave end of a pty */
@@ -504,11 +505,14 @@ int devpts_pty_new(struct inode *ptmx_inode, struct tty_struct *tty)
504505
if (!IS_ERR(dentry)) {
505506
d_add(dentry, inode);
506507
fsnotify_create(root->d_inode, dentry);
508+
} else {
509+
iput(inode);
510+
ret = -ENOMEM;
507511
}
508512

509513
mutex_unlock(&root->d_inode->i_mutex);
510514

511-
return 0;
515+
return ret;
512516
}
513517

514518
struct tty_struct *devpts_get_tty(struct inode *pts_inode, int number)
@@ -544,17 +548,12 @@ void devpts_pty_kill(struct tty_struct *tty)
544548
mutex_lock(&root->d_inode->i_mutex);
545549

546550
dentry = d_find_alias(inode);
547-
if (IS_ERR(dentry))
548-
goto out;
549-
550-
if (dentry) {
551-
inode->i_nlink--;
552-
d_delete(dentry);
553-
dput(dentry); /* d_alloc_name() in devpts_pty_new() */
554-
}
555551

552+
inode->i_nlink--;
553+
d_delete(dentry);
554+
dput(dentry); /* d_alloc_name() in devpts_pty_new() */
556555
dput(dentry); /* d_find_alias above */
557-
out:
556+
558557
mutex_unlock(&root->d_inode->i_mutex);
559558
}
560559

‎fs/exec.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1875,7 +1875,7 @@ static void wait_for_dump_helpers(struct file *file)
18751875

18761876

18771877
/*
1878-
* uhm_pipe_setup
1878+
* umh_pipe_setup
18791879
* helper function to customize the process used
18801880
* to collect the core in userspace. Specifically
18811881
* it sets up a pipe and installs it as fd 0 (stdin)

‎fs/fifo.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ static int fifo_open(struct inode *inode, struct file *filp)
6666
/* suppress POLLHUP until we have
6767
* seen a writer */
6868
filp->f_version = pipe->w_counter;
69-
} else
70-
{
69+
} else {
7170
wait_for_partner(inode, &pipe->w_counter);
7271
if(signal_pending(current))
7372
goto err_rd;

‎fs/inode.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1715,7 +1715,7 @@ void init_special_inode(struct inode *inode, umode_t mode, dev_t rdev)
17151715
EXPORT_SYMBOL(init_special_inode);
17161716

17171717
/**
1718-
* Init uid,gid,mode for new inode according to posix standards
1718+
* inode_init_owner - Init uid,gid,mode for new inode according to posix standards
17191719
* @inode: New inode
17201720
* @dir: Directory inode
17211721
* @mode: mode of the new inode

0 commit comments

Comments
 (0)