[PATCH -next 0/3] ext4: Using scope-based resource management function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

This patch set is dedicated to using scope-based resource management
functions to replace the direct use of lock/unlock methods, so that
developers can focus more on using resources in a certain scope and
avoid overly focusing on resource leakage issues.

At the same time, some functions can remove the controversial goto
label(eg: patch 3), which usually only releases resources and then
exits the function. After replacement, these functions can exit
directly without worrying about resources not being released.

This patch set has been tested by fsstress for a long time and no
problems were found.

Thanks,
Li Zetao.

Li Zetao (3):
  ext4: Use scoped()/scoped_guard() to drop read_lock()/unlock pair
  ext4: Use scoped()/scoped_guard() to drop write_lock()/unlock pair
  ext4: Use scoped()/scoped_guard() to drop rcu_read_lock()/unlock pair

 fs/ext4/block_validity.c |  27 +++--
 fs/ext4/ext4.h           |   3 +-
 fs/ext4/extents_status.c |  67 +++++--------
 fs/ext4/fast_commit.c    |   3 +-
 fs/ext4/inode.c          |  14 ++-
 fs/ext4/mballoc.c        | 208 +++++++++++++++++----------------------
 fs/ext4/resize.c         |  20 ++--
 fs/ext4/super.c          |  29 +++---
 8 files changed, 158 insertions(+), 213 deletions(-)

-- 
2.34.1





[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux