History

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

Linus Torvalds committed 2 months ago

Commit ada9ccf2 parents dc83d18 d410cd54 files · +6 −9Browse files

Unified · Split

4 files
  1. fs/orangefs/devorangefs-req.c +1 −0
  2. fs/orangefs/inode.c +4 −4
  3. fs/orangefs/orangefs-debugfs.c +1 −0
  4. fs/orangefs/xattr.c +0 −5
fs/orangefs/devorangefs-req.c+1−0
@@ -474,6 +474,7 @@ static ssize_t orangefs_devreq_write_iter(struct kiocb *iocb, · 473 unmodified lines
474474 op->downcall.trailer_size, iter)) {
475475 gossip_err("%s: failed to copy trailer.\n", __func__);
476476 vfree(op->downcall.trailer_buf);
477+ op->downcall.trailer_buf = NULL;
477478 goto Efault;
478479 }
479480
fs/orangefs/inode.c+4−4
@@ -652,8 +652,8 @@ vm_fault_t orangefs_page_mkwrite(struct vm_fault *vmf) · 651 unmodified lines
652652 wr = folio_get_private(folio);
653653 if (uid_eq(wr->uid, current_fsuid()) &&
654654 gid_eq(wr->gid, current_fsgid())) {
655− wr->pos = page_offset(vmf->page);
656− wr->len = PAGE_SIZE;
655+ wr->pos = folio_pos(folio);
656+ wr->len = folio_size(folio);
657657 goto okay;
658658 } else {
659659 if (orangefs_launder_folio(folio)) {
@@ -667,8 +667,8 @@ vm_fault_t orangefs_page_mkwrite(struct vm_fault *vmf) · 7 unmodified lines
667667 ret = VM_FAULT_LOCKED|VM_FAULT_RETRY;
668668 goto out;
669669 }
670− wr->pos = page_offset(vmf->page);
671− wr->len = PAGE_SIZE;
670+ wr->pos = folio_pos(folio);
671+ wr->len = folio_size(folio);
672672 wr->uid = current_fsuid();
673673 wr->gid = current_fsgid();
674674 folio_attach_private(folio, wr);
fs/orangefs/orangefs-debugfs.c+1−0
@@ -569,6 +569,7 @@ static int orangefs_prepare_cdm_array(char *debug_array_string) · 568 unmodified lines
569569 cds_delimiter = strchr(cds_head, '\n');
570570 *cds_delimiter = '\0';
571571
572+ cds_head = skip_spaces(cds_head);
572573 keyword_len = strcspn(cds_head, " ");
573574
574575 cdm_array[i].keyword = kzalloc(keyword_len + 1, GFP_KERNEL);
fs/orangefs/xattr.c+0−5
@@ -72,11 +72,6 @@ static struct orangefs_cached_xattr *find_cached_xattr(struct inode *inode, · 71 unmodified lines
7272 if (hlist_empty(h))
7373 return NULL;
7474 hlist_for_each_entry_safe(cx, tmp, h, node) {
75−/* if (!time_before(jiffies, cx->timeout)) {
76− hlist_del(&cx->node);
77− kfree(cx);
78− continue;
79− }*/
8075 if (!strcmp(cx->key, key))
8176 return cx;
8277 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t