]> Git Repo - linux.git/commitdiff
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
authorLinus Torvalds <[email protected]>
Fri, 6 Apr 2018 02:17:50 +0000 (19:17 -0700)
committerLinus Torvalds <[email protected]>
Fri, 6 Apr 2018 02:17:50 +0000 (19:17 -0700)
Pull misc filesystem updates from Jan Kara:
 "udf, ext2, quota, fsnotify fixes & cleanups:

   - udf fixes for handling of media without uid/gid

   - udf fixes for some corner cases in parsing of volume recognition
     sequence

   - improvements of fsnotify handling of ENOMEM

   - new ioctl to allow setting of watch descriptor id for inotify (for
     checkpoint - restart)

   - small ext2, reiserfs, quota cleanups"

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
  quota: Kill an unused extern entry form quota.h
  reiserfs: Remove VLA from fs/reiserfs/reiserfs.h
  udf: fix potential refcnt problem of nls module
  ext2: change return code to -ENOMEM when failing memory allocation
  udf: Do not mark possibly inconsistent filesystems as closed
  fsnotify: Let userspace know about lost events due to ENOMEM
  fanotify: Avoid lost events due to ENOMEM for unlimited queues
  udf: Remove never implemented mount options
  udf: Update mount option documentation
  udf: Provide saner default for invalid uid / gid
  udf: Clean up handling of invalid uid/gid
  udf: Apply uid/gid mount options also to new inodes & chown
  udf: Ignore [ug]id=ignore mount options
  udf: Fix handling of Partition Descriptors
  udf: Unify common handling of descriptors
  udf: Convert descriptor index definitions to enum
  udf: Allow volume descriptor sequence to be terminated by unrecorded block
  udf: Simplify handling of Volume Descriptor Pointers
  udf: Fix off-by-one in volume descriptor sequence length
  inotify: Extend ioctl to allow to request id of new watch descriptor

1  2 
fs/notify/fanotify/fanotify_user.c
fs/notify/inotify/inotify_user.c

index fa803a58a6054ef621b6a259427ae489e8122f71,72e367822efb4a5c56f064cdcaf1fbaf30dff19d..ec4d8c59d0e379df56efef0c86d3d303326ff071
@@@ -757,7 -757,7 +757,7 @@@ SYSCALL_DEFINE2(fanotify_init, unsigne
        group->fanotify_data.user = user;
        atomic_inc(&user->fanotify_listeners);
  
-       oevent = fanotify_alloc_event(NULL, FS_Q_OVERFLOW, NULL);
+       oevent = fanotify_alloc_event(group, NULL, FS_Q_OVERFLOW, NULL);
        if (unlikely(!oevent)) {
                fd = -ENOMEM;
                goto out_destroy_group;
@@@ -820,8 -820,9 +820,8 @@@ out_destroy_group
        return fd;
  }
  
 -SYSCALL_DEFINE5(fanotify_mark, int, fanotify_fd, unsigned int, flags,
 -                            __u64, mask, int, dfd,
 -                            const char  __user *, pathname)
 +static int do_fanotify_mark(int fanotify_fd, unsigned int flags, __u64 mask,
 +                          int dfd, const char  __user *pathname)
  {
        struct inode *inode = NULL;
        struct vfsmount *mnt = NULL;
@@@ -927,20 -928,13 +927,20 @@@ fput_and_out
        return ret;
  }
  
 +SYSCALL_DEFINE5(fanotify_mark, int, fanotify_fd, unsigned int, flags,
 +                            __u64, mask, int, dfd,
 +                            const char  __user *, pathname)
 +{
 +      return do_fanotify_mark(fanotify_fd, flags, mask, dfd, pathname);
 +}
 +
  #ifdef CONFIG_COMPAT
  COMPAT_SYSCALL_DEFINE6(fanotify_mark,
                                int, fanotify_fd, unsigned int, flags,
                                __u32, mask0, __u32, mask1, int, dfd,
                                const char  __user *, pathname)
  {
 -      return sys_fanotify_mark(fanotify_fd, flags,
 +      return do_fanotify_mark(fanotify_fd, flags,
  #ifdef __BIG_ENDIAN
                                ((__u64)mask0 << 32) | mask1,
  #else
index 43c23653ce2eb186277d09211dcfef46e5c4719c,8f17719842ec924eb0efbd728e1e6e1d19417d27..ef32f36579589090535cd046ae3a193b77bb830d
@@@ -307,6 -307,20 +307,20 @@@ static long inotify_ioctl(struct file *
                spin_unlock(&group->notification_lock);
                ret = put_user(send_len, (int __user *) p);
                break;
+ #ifdef CONFIG_CHECKPOINT_RESTORE
+       case INOTIFY_IOC_SETNEXTWD:
+               ret = -EINVAL;
+               if (arg >= 1 && arg <= INT_MAX) {
+                       struct inotify_group_private_data *data;
+                       data = &group->inotify_data;
+                       spin_lock(&data->idr_lock);
+                       idr_set_cursor(&data->idr, (unsigned int)arg);
+                       spin_unlock(&data->idr_lock);
+                       ret = 0;
+               }
+               break;
+ #endif /* CONFIG_CHECKPOINT_RESTORE */
        }
  
        return ret;
@@@ -635,7 -649,7 +649,7 @@@ static struct fsnotify_group *inotify_n
  
  
  /* inotify syscalls */
 -SYSCALL_DEFINE1(inotify_init1, int, flags)
 +static int do_inotify_init(int flags)
  {
        struct fsnotify_group *group;
        int ret;
        return ret;
  }
  
 +SYSCALL_DEFINE1(inotify_init1, int, flags)
 +{
 +      return do_inotify_init(flags);
 +}
 +
  SYSCALL_DEFINE0(inotify_init)
  {
 -      return sys_inotify_init1(0);
 +      return do_inotify_init(0);
  }
  
  SYSCALL_DEFINE3(inotify_add_watch, int, fd, const char __user *, pathname,
This page took 0.077042 seconds and 4 git commands to generate.