We've got a whopping 29 GFS2 patches for this merge window, mainly
because we held some back from the previous merge window until we
could get them perfected and well tested. We have a couple patch
sets, including my patch set for protecting glock gl_object and
Andreas Gruenbacher's patch set to fix the long-standing shrink-
slab hang, plus a bunch of assorted bugs and cleanups:

1. I fixed a bug whereby an IO error would lead to a double-brelse.
2. Andreas Gruenbacher made a minor cleanup to call his relatively
   new function, gfs2_holder_initialized, rather than doing it
   manually. This was just missed by a previous patch set.
3. Jan Kara fixed a bug whereby the SGID was being cleared when
   inheriting ACLs.
4. Andreas found a bug and fixed it in his previous patch,
   "Get rid of flush_delayed_work in gfs2_evict_inode". A call to
   flush_delayed_work was deleted from *gfs2_inode_lookup and added
   to gfs2_create_inode.
5. Wang Xibo found and fixed a list_add call in inode_go_lock
   that specified the parameters in the wrong order.
6. Coly Li submitted a patch to add the REQ_PRIO to some of GFS2's
   metadata reads that were accidentally missing them.
7 - 10. I submitted a 4-patch set to protect the glock gl_object
   field. GFS2 was setting and checking gl_object with no locking
   mechanism, so the value was occasionally stomped on, which caused
   file system corruption.
11. I submitted a small cleanup to function gfs2_clear_rgrpd.
   It was needlessly adding rgrp glocks to the lru list, then pulling
   them back off immediately. The rgrp glocks don't use the lru list
   anyway, so doing so was just a waste of time.
12. I submitted a patch that checks the GLOF_LRU flag on a glock
   before trying to remove it from the lru_list. This avoids a lot
   of unnecessary spin_lock contention.
13. I submitted a patch to delete GFS2's debugfs files only after
   we evict all the glocks. Before this patch, GFS2 would delete the
   debugfs files, and if unmount hung waiting for a glock, there was
   no way to debug the problem. Now, if a hang occurs during umount,
   we can examine the debugfs files to figure out why it's hung.
14. Andreas Gruenbacher submitted a patch to fix some trivial typos.
15 - 19. Andreas also submitted a five-part patch set to fix the
   longstanding hang involving the slab shrinker: dlm requires
   memory, calls the inode shrinker, which calls gfs2's evict, which
   calls back into DLM before it can evict an inode.
20. Abhi Das submitted a patch to forcibly flush the active items
   list to relieve memory pressure. This fixes a long-standing bug
   whereby GFS2 was getting hung permanently in balance_dirty_pages.
21. Thomas Tai submitted a patch to fix a slab corruption problem
   due to a residual pointer left in the lock_dlm lockstruct.
22. I submitted a patch to withdraw the file system if IO errors
   are encountered while writing to the journals or statfs system
   file which were previously not being sent back up. Before, some
   IO errors were sometimes not be detected for several hours, and
   at recovery time, the journal errors made journal replay
   impossible.
23. Andreas has a patch to fix an annoying format-truncation compiler
   warning so GFS2 compiles cleanly.
24. I have a patch that fixes a handful of sparse compiler warnings.
25. Andreas fixed up an useless gl_object warning caused by an
   earlier patch.
26. Arvind Yadav added a patch to properly constify our rhashtable
   params declare.
27. I added a patch to fix a regression caused by the non-recursive
   delete and truncate patch that caused file system blocks to not
   be properly freed.
28. Ernesto A. Fernández added a patch to fix a place where GFS2
   would send back the wrong return code setting extended attributes.
29. Ernesto also added a patch to fix a case in which GFS2 was
   improperly setting an inode's i_mode, potentially granting access
   to the wrong users.
gfs2: preserve i_mode if __gfs2_set_acl() fails

When changing a file's acl mask, __gfs2_set_acl() will first set the
group bits of i_mode to the value of the mask, and only then set the
actual extended attribute representing the new acl.

If the second part fails (due to lack of space, for example) and the
file had no acl attribute to begin with, the system will from now on
assume that the mask permission bits are actual group permission bits,
potentially granting access to the wrong users.

Prevent this by only changing the inode mode after the acl has been set.

Signed-off-by: Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
1 file changed