projects/linux·commit ada9ccfb

Merge tag 'for-linus-7.3-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux

ada9ccfb · Linus Torvalds <[email protected]> · 2026-08-20 12:36:26 -07:00

Pull orangefs updates from Mike Marshall:
 "Fixes:
   - fix double-free of trailer_buf
   - skip leading spaces before parsing client debug masks

  Cleanup:
   - Remove commented out code

  New:
   - use folio_pos() and folio_size() in orangefs_page_mkwrite()"

* tag 'for-linus-7.3-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux:
  orangefs: skip leading spaces before parsing client debug masks
  orangefs: Remove commented out code in find_cached_xattr
  orangefs: use folio_pos() and folio_size() in orangefs_page_mkwrite()
  orangefs: fix double-free of trailer_buf on readdir copy failure
Commit
ada9ccfb81eca6943c3cd42d23b9ddd446e75342
Parents
dc83d18c · d410cd53

Merge commit. Changes below are compared with the first parent: dc83d18c.

Changes

4 files changed · +6 −9

fs/orangefs/devorangefs-req.c

View file
diff --git a/fs/orangefs/devorangefs-req.c b/fs/orangefs/devorangefs-req.c
index 33ee8cb..e5c60da 100644
--- a/fs/orangefs/devorangefs-req.c
+++ b/fs/orangefs/devorangefs-req.c
@@ -474,6 +474,7 @@ static ssize_t orangefs_devreq_write_iter(struct kiocb *iocb,
op->downcall.trailer_size, iter)) {
gossip_err("%s: failed to copy trailer.\n", __func__);
vfree(op->downcall.trailer_buf);
+ op->downcall.trailer_buf = NULL;
goto Efault;
}

fs/orangefs/inode.c

View file
diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c
index 7143b64..cd3273c 100644
--- a/fs/orangefs/inode.c
+++ b/fs/orangefs/inode.c
@@ -652,8 +652,8 @@ vm_fault_t orangefs_page_mkwrite(struct vm_fault *vmf)
wr = folio_get_private(folio);
if (uid_eq(wr->uid, current_fsuid()) &&
gid_eq(wr->gid, current_fsgid())) {
- wr->pos = page_offset(vmf->page);
- wr->len = PAGE_SIZE;
+ wr->pos = folio_pos(folio);
+ wr->len = folio_size(folio);
goto okay;
} else {
if (orangefs_launder_folio(folio)) {
@@ -667,8 +667,8 @@ vm_fault_t orangefs_page_mkwrite(struct vm_fault *vmf)
ret = VM_FAULT_LOCKED|VM_FAULT_RETRY;
goto out;
}
- wr->pos = page_offset(vmf->page);
- wr->len = PAGE_SIZE;
+ wr->pos = folio_pos(folio);
+ wr->len = folio_size(folio);
wr->uid = current_fsuid();
wr->gid = current_fsgid();
folio_attach_private(folio, wr);

fs/orangefs/orangefs-debugfs.c

View file
diff --git a/fs/orangefs/orangefs-debugfs.c b/fs/orangefs/orangefs-debugfs.c
index 69bd73a..9f94919 100644
--- a/fs/orangefs/orangefs-debugfs.c
+++ b/fs/orangefs/orangefs-debugfs.c
@@ -569,6 +569,7 @@ static int orangefs_prepare_cdm_array(char *debug_array_string)
cds_delimiter = strchr(cds_head, '\n');
*cds_delimiter = '\0';
+ cds_head = skip_spaces(cds_head);
keyword_len = strcspn(cds_head, " ");
cdm_array[i].keyword = kzalloc(keyword_len + 1, GFP_KERNEL);

fs/orangefs/xattr.c

View file
diff --git a/fs/orangefs/xattr.c b/fs/orangefs/xattr.c
index b6d1163..885fd3b 100644
--- a/fs/orangefs/xattr.c
+++ b/fs/orangefs/xattr.c
@@ -72,11 +72,6 @@ static struct orangefs_cached_xattr *find_cached_xattr(struct inode *inode,
if (hlist_empty(h))
return NULL;
hlist_for_each_entry_safe(cx, tmp, h, node) {
-/* if (!time_before(jiffies, cx->timeout)) {
- hlist_del(&cx->node);
- kfree(cx);
- continue;
- }*/
if (!strcmp(cx->key, key))
return cx;
}