Commit 489fa31e authored by Linus Torvalds's avatar Linus Torvalds

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()
parents 3df88c6a 39ecb653
...@@ -238,8 +238,7 @@ static void *cramfs_blkdev_read(struct super_block *sb, unsigned int offset, ...@@ -238,8 +238,7 @@ static void *cramfs_blkdev_read(struct super_block *sb, unsigned int offset,
struct page *page = pages[i]; struct page *page = pages[i];
if (page) { if (page) {
memcpy(data, kmap(page), PAGE_SIZE); memcpy_from_page(data, page, 0, PAGE_SIZE);
kunmap(page);
put_page(page); put_page(page);
} else } else
memset(data, 0, PAGE_SIZE); memset(data, 0, PAGE_SIZE);
...@@ -815,7 +814,7 @@ static int cramfs_read_folio(struct file *file, struct folio *folio) ...@@ -815,7 +814,7 @@ static int cramfs_read_folio(struct file *file, struct folio *folio)
maxblock = (inode->i_size + PAGE_SIZE - 1) >> PAGE_SHIFT; maxblock = (inode->i_size + PAGE_SIZE - 1) >> PAGE_SHIFT;
bytes_filled = 0; bytes_filled = 0;
pgdata = kmap(page); pgdata = kmap_local_page(page);
if (page->index < maxblock) { if (page->index < maxblock) {
struct super_block *sb = inode->i_sb; struct super_block *sb = inode->i_sb;
...@@ -903,13 +902,13 @@ static int cramfs_read_folio(struct file *file, struct folio *folio) ...@@ -903,13 +902,13 @@ static int cramfs_read_folio(struct file *file, struct folio *folio)
memset(pgdata + bytes_filled, 0, PAGE_SIZE - bytes_filled); memset(pgdata + bytes_filled, 0, PAGE_SIZE - bytes_filled);
flush_dcache_page(page); flush_dcache_page(page);
kunmap(page); kunmap_local(pgdata);
SetPageUptodate(page); SetPageUptodate(page);
unlock_page(page); unlock_page(page);
return 0; return 0;
err: err:
kunmap(page); kunmap_local(pgdata);
ClearPageUptodate(page); ClearPageUptodate(page);
SetPageError(page); SetPageError(page);
unlock_page(page); unlock_page(page);
......
...@@ -21,6 +21,7 @@ static long ns_ioctl(struct file *filp, unsigned int ioctl, ...@@ -21,6 +21,7 @@ static long ns_ioctl(struct file *filp, unsigned int ioctl,
static const struct file_operations ns_file_operations = { static const struct file_operations ns_file_operations = {
.llseek = no_llseek, .llseek = no_llseek,
.unlocked_ioctl = ns_ioctl, .unlocked_ioctl = ns_ioctl,
.compat_ioctl = compat_ptr_ioctl,
}; };
static char *ns_dname(struct dentry *dentry, char *buffer, int buflen) static char *ns_dname(struct dentry *dentry, char *buffer, int buflen)
...@@ -254,7 +255,7 @@ struct file *proc_ns_fget(int fd) ...@@ -254,7 +255,7 @@ struct file *proc_ns_fget(int fd)
/** /**
* ns_match() - Returns true if current namespace matches dev/ino provided. * ns_match() - Returns true if current namespace matches dev/ino provided.
* @ns_common: current ns * @ns: current namespace
* @dev: dev_t from nsfs that will be matched against current nsfs * @dev: dev_t from nsfs that will be matched against current nsfs
* @ino: ino_t from nsfs that will be matched against current nsfs * @ino: ino_t from nsfs that will be matched against current nsfs
* *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment