]> Git Repo - linux.git/commitdiff
Merge tag 'gfs2-v5.15-rc5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <[email protected]>
Tue, 2 Nov 2021 19:35:04 +0000 (12:35 -0700)
committerLinus Torvalds <[email protected]>
Tue, 2 Nov 2021 19:35:04 +0000 (12:35 -0700)
Pull gfs2 updates from Andreas Gruenbacher:

 - Fix a locking order inversion between the inode and iopen glocks in
   gfs2_inode_lookup.

 - Implement proper queuing of glock holders for glocks that require
   instantiation (like reading an inode or bitmap blocks from disk).
   Before, multiple glock holders could race with each other and
   half-initialized objects could be exposed; the GL_SKIP flag further
   exacerbated this problem.

 - Fix a rare deadlock between inode lookup / creation and remote delete
   work.

 - Fix a rare scheduling-while-atomic bug in dlm during glock hash table
   walks.

 - Various other minor fixes and cleanups.

* tag 'gfs2-v5.15-rc5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: (21 commits)
  gfs2: Fix unused value warning in do_gfs2_set_flags()
  gfs2: check context in gfs2_glock_put
  gfs2: Fix glock_hash_walk bugs
  gfs2: Cancel remote delete work asynchronously
  gfs2: set glock object after nq
  gfs2: remove RDF_UPTODATE flag
  gfs2: Eliminate GIF_INVALID flag
  gfs2: fix GL_SKIP node_scope problems
  gfs2: split glock instantiation off from do_promote
  gfs2: further simplify do_promote
  gfs2: re-factor function do_promote
  gfs2: Remove 'first' trace_gfs2_promote argument
  gfs2: change go_lock to go_instantiate
  gfs2: dump glocks from gfs2_consist_OBJ_i
  gfs2: dequeue iopen holder in gfs2_inode_lookup error
  gfs2: Save ip from gfs2_glock_nq_init
  gfs2: Allow append and immutable bits to coexist
  gfs2: Switch some BUG_ON to GLOCK_BUG_ON for debug
  gfs2: move GL_SKIP check from glops to do_promote
  gfs2: Add GL_SKIP holder flag to dump_holder
  ...

1  2 
fs/gfs2/file.c

diff --combined fs/gfs2/file.c
index 8f4627a1935949e640293ccbe024171e3d7f1814,8267ab9b57decd1f64ed455ce84d491470ead34c..adafaaf7d24dee43b793ea3a2a5ec5bda7a8887a
@@@ -213,11 -213,9 +213,9 @@@ void gfs2_set_inode_flags(struct inode 
   * @inode: The inode
   * @reqflags: The flags to set
   * @mask: Indicates which flags are valid
-  * @fsflags: The FS_* inode flags passed in
   *
   */
- static int do_gfs2_set_flags(struct inode *inode, u32 reqflags, u32 mask,
-                            const u32 fsflags)
+ static int do_gfs2_set_flags(struct inode *inode, u32 reqflags, u32 mask)
  {
        struct gfs2_inode *ip = GFS2_I(inode);
        struct gfs2_sbd *sdp = GFS2_SB(inode);
        if ((new_flags ^ flags) == 0)
                goto out;
  
-       error = -EPERM;
-       if (IS_IMMUTABLE(inode) && (new_flags & GFS2_DIF_IMMUTABLE))
-               goto out;
-       if (IS_APPEND(inode) && (new_flags & GFS2_DIF_APPENDONLY))
-               goto out;
        if (!IS_IMMUTABLE(inode)) {
                error = gfs2_permission(&init_user_ns, inode, MAY_WRITE);
                if (error)
@@@ -313,7 -306,7 +306,7 @@@ int gfs2_fileattr_set(struct user_names
                mask &= ~(GFS2_DIF_TOPDIR | GFS2_DIF_INHERIT_JDATA);
        }
  
-       return do_gfs2_set_flags(inode, gfsflags, mask, fsflags);
+       return do_gfs2_set_flags(inode, gfsflags, mask);
  }
  
  static int gfs2_getlabel(struct file *filp, char __user *label)
@@@ -1544,6 -1537,8 +1537,6 @@@ static int gfs2_flock(struct file *file
  {
        if (!(fl->fl_flags & FL_FLOCK))
                return -ENOLCK;
 -      if (fl->fl_type & LOCK_MAND)
 -              return -EOPNOTSUPP;
  
        if (fl->fl_type == F_UNLCK) {
                do_unflock(file, fl);
@@@ -1557,7 -1552,7 +1550,7 @@@ const struct file_operations gfs2_file_
        .llseek         = gfs2_llseek,
        .read_iter      = gfs2_file_read_iter,
        .write_iter     = gfs2_file_write_iter,
 -      .iopoll         = iomap_dio_iopoll,
 +      .iopoll         = iocb_bio_iopoll,
        .unlocked_ioctl = gfs2_ioctl,
        .compat_ioctl   = gfs2_compat_ioctl,
        .mmap           = gfs2_mmap,
@@@ -1590,7 -1585,7 +1583,7 @@@ const struct file_operations gfs2_file_
        .llseek         = gfs2_llseek,
        .read_iter      = gfs2_file_read_iter,
        .write_iter     = gfs2_file_write_iter,
 -      .iopoll         = iomap_dio_iopoll,
 +      .iopoll         = iocb_bio_iopoll,
        .unlocked_ioctl = gfs2_ioctl,
        .compat_ioctl   = gfs2_compat_ioctl,
        .mmap           = gfs2_mmap,
This page took 0.09271 seconds and 4 git commands to generate.