Re: [PATCH 2/5] pstore: inode: Convert mutex usage to guard(mutex)

2023-12-04 Thread Dave Chinner
tatic void pstore_kill_sb(struct super_block *sb) > { > - mutex_lock(&pstore_sb_lock); > + guard(mutex)(&pstore_sb_lock); > WARN_ON(pstore_sb && pstore_sb != sb); > > kill_litter_super(sb); > pstore_sb = NULL; > > - mutex_lo

Re: [PATCH 3/4] xattr: Use dedicated slab buckets for setxattr()

2024-03-04 Thread Dave Chinner
g a heap spraying vector that almost no-one will ever see for a far more frequent -ENOMEM denial of service that will be seen on production systems where large xattrs are used. -Dave. -- Dave Chinner da...@fromorbit.com

Re: [PATCH 3/8][next] xfs: Avoid -Wflex-array-member-not-at-end warnings

2025-02-24 Thread Dave Chinner
use another allocation for ic_bvecs in xlog_alloc_log() (similar to how we do the separate allocation of the *ic_data buffer that is mapped into ic_bio at IO time), then none of the code that accesses ic_bio for IO purposes needs to change and the compiler warnings go away. That's a much cleaner solution that requires no extra cognitive load on developers to maintain in correct working order. -Dave. -- Dave Chinner da...@fromorbit.com