Skip to content

Commit 489fa31

Browse files
committed
Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull misc vfs updates from Al Viro: "Assorted stuff that didn't fit anywhere else" * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: nsfs: repair kernel-doc for ns_match() nsfs: add compat ioctl handler fs/cramfs: Convert kmap() to kmap_local_data()
2 parents 3df88c6 + 39ecb65 commit 489fa31

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

fs/cramfs/inode.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,7 @@ static void *cramfs_blkdev_read(struct super_block *sb, unsigned int offset,
238238
struct page *page = pages[i];
239239

240240
if (page) {
241-
memcpy(data, kmap(page), PAGE_SIZE);
242-
kunmap(page);
241+
memcpy_from_page(data, page, 0, PAGE_SIZE);
243242
put_page(page);
244243
} else
245244
memset(data, 0, PAGE_SIZE);
@@ -815,7 +814,7 @@ static int cramfs_read_folio(struct file *file, struct folio *folio)
815814

816815
maxblock = (inode->i_size + PAGE_SIZE - 1) >> PAGE_SHIFT;
817816
bytes_filled = 0;
818-
pgdata = kmap(page);
817+
pgdata = kmap_local_page(page);
819818

820819
if (page->index < maxblock) {
821820
struct super_block *sb = inode->i_sb;
@@ -903,13 +902,13 @@ static int cramfs_read_folio(struct file *file, struct folio *folio)
903902

904903
memset(pgdata + bytes_filled, 0, PAGE_SIZE - bytes_filled);
905904
flush_dcache_page(page);
906-
kunmap(page);
905+
kunmap_local(pgdata);
907906
SetPageUptodate(page);
908907
unlock_page(page);
909908
return 0;
910909

911910
err:
912-
kunmap(page);
911+
kunmap_local(pgdata);
913912
ClearPageUptodate(page);
914913
SetPageError(page);
915914
unlock_page(page);

fs/nsfs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ static long ns_ioctl(struct file *filp, unsigned int ioctl,
2121
static const struct file_operations ns_file_operations = {
2222
.llseek = no_llseek,
2323
.unlocked_ioctl = ns_ioctl,
24+
.compat_ioctl = compat_ptr_ioctl,
2425
};
2526

2627
static char *ns_dname(struct dentry *dentry, char *buffer, int buflen)
@@ -254,7 +255,7 @@ struct file *proc_ns_fget(int fd)
254255

255256
/**
256257
* ns_match() - Returns true if current namespace matches dev/ino provided.
257-
* @ns_common: current ns
258+
* @ns: current namespace
258259
* @dev: dev_t from nsfs that will be matched against current nsfs
259260
* @ino: ino_t from nsfs that will be matched against current nsfs
260261
*

0 commit comments

Comments
 (0)