diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-08-20 12:36:26 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-08-20 12:36:26 -0700 |
| commit | ada9ccfb81eca6943c3cd42d23b9ddd446e75342 (patch) | |
| tree | 963550660d97dcc84378b6682ec1b367fd86fd67 | |
| parent | dc83d18cdd90482c70fa4320160bba70ec5c9ef8 (diff) | |
| parent | d410cd5303ec59c7cf23dd61423752ce8e9ecb59 (diff) | |
Merge tag 'for-linus-7.3-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux
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
| -rw-r--r-- | fs/orangefs/devorangefs-req.c | 1 | ||||
| -rw-r--r-- | fs/orangefs/inode.c | 8 | ||||
| -rw-r--r-- | fs/orangefs/orangefs-debugfs.c | 1 | ||||
| -rw-r--r-- | fs/orangefs/xattr.c | 5 |
4 files changed, 6 insertions, 9 deletions
diff --git a/fs/orangefs/devorangefs-req.c b/fs/orangefs/devorangefs-req.c index 33ee8cb32f83..e5c60da7e677 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; } diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c index 7143b64b5b25..cd3273c88e03 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); diff --git a/fs/orangefs/orangefs-debugfs.c b/fs/orangefs/orangefs-debugfs.c index 69bd73a2b556..9f94919a6bc6 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); diff --git a/fs/orangefs/xattr.c b/fs/orangefs/xattr.c index b6d116302de4..885fd3bd5a3d 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; } |
