Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull misc vfs updates from Al Viro:
"Assorted bits and pieces from various people. No common topic in this
pile, sorry"

* 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
fs/affs: add rename exchange
fs/affs: add rename2 to prepare multiple methods
Make stat/lstat/fstatat pass AT_NO_AUTOMOUNT to vfs_statx()
fs: don't set *REFERENCED on single use objects
fs: compat: Remove warning from COMPATIBLE_IOCTL
remove pointless extern of atime_need_update_rcu()
fs: completely ignore unknown open flags
fs: add a VALID_OPEN_FLAGS
fs: remove _submit_bh()
fs: constify tree_descr arrays passed to simple_fill_super()
fs: drop duplicate header percpu-rwsem.h
fs/affs: bugfix: Write files greater than page size on OFS
fs/affs: bugfix: enable writes on OFS disks
fs/affs: remove node generation check
fs/affs: import amigaffs.h
fs/affs: bugfix: make symbolic links work again

+130 -74
+1 -1
drivers/infiniband/hw/qib/qib_fs.c
··· 512 512 unsigned long flags; 513 513 int ret; 514 514 515 - static struct tree_descr files[] = { 515 + static const struct tree_descr files[] = { 516 516 [2] = {"driver_stats", &driver_ops[0], S_IRUGO}, 517 517 [3] = {"driver_stats_names", &driver_ops[1], S_IRUGO}, 518 518 {""},
+2 -2
drivers/xen/xenfs/super.c
··· 44 44 45 45 static int xenfs_fill_super(struct super_block *sb, void *data, int silent) 46 46 { 47 - static struct tree_descr xenfs_files[] = { 47 + static const struct tree_descr xenfs_files[] = { 48 48 [2] = { "xenbus", &xen_xenbus_fops, S_IRUSR|S_IWUSR }, 49 49 { "capabilities", &capabilities_file_ops, S_IRUGO }, 50 50 { "privcmd", &xen_privcmd_fops, S_IRUSR|S_IWUSR }, 51 51 {""}, 52 52 }; 53 53 54 - static struct tree_descr xenfs_init_files[] = { 54 + static const struct tree_descr xenfs_init_files[] = { 55 55 [2] = { "xenbus", &xen_xenbus_fops, S_IRUSR|S_IWUSR }, 56 56 { "capabilities", &capabilities_file_ops, S_IRUGO }, 57 57 { "privcmd", &xen_privcmd_fops, S_IRUSR|S_IWUSR },
+2 -2
fs/affs/affs.h
··· 7 7 #include <linux/types.h> 8 8 #include <linux/fs.h> 9 9 #include <linux/buffer_head.h> 10 - #include <linux/amigaffs.h> 10 + #include "amigaffs.h" 11 11 #include <linux/mutex.h> 12 12 #include <linux/workqueue.h> 13 13 ··· 173 173 struct dentry *dentry); 174 174 extern int affs_symlink(struct inode *dir, struct dentry *dentry, 175 175 const char *symname); 176 - extern int affs_rename(struct inode *old_dir, struct dentry *old_dentry, 176 + extern int affs_rename2(struct inode *old_dir, struct dentry *old_dentry, 177 177 struct inode *new_dir, struct dentry *new_dentry, 178 178 unsigned int flags); 179 179
+1 -1
fs/affs/dir.c
··· 35 35 .symlink = affs_symlink, 36 36 .mkdir = affs_mkdir, 37 37 .rmdir = affs_rmdir, 38 - .rename = affs_rename, 38 + .rename = affs_rename2, 39 39 .setattr = affs_notify_change, 40 40 }; 41 41
+5 -5
fs/affs/file.c
··· 499 499 } 500 500 501 501 static int 502 - affs_do_readpage_ofs(struct page *page, unsigned to) 502 + affs_do_readpage_ofs(struct page *page, unsigned to, int create) 503 503 { 504 504 struct inode *inode = page->mapping->host; 505 505 struct super_block *sb = inode->i_sb; ··· 518 518 boff = tmp % bsize; 519 519 520 520 while (pos < to) { 521 - bh = affs_bread_ino(inode, bidx, 0); 521 + bh = affs_bread_ino(inode, bidx, create); 522 522 if (IS_ERR(bh)) 523 523 return PTR_ERR(bh); 524 524 tmp = min(bsize - boff, to - pos); ··· 620 620 memset(page_address(page) + to, 0, PAGE_SIZE - to); 621 621 } 622 622 623 - err = affs_do_readpage_ofs(page, to); 623 + err = affs_do_readpage_ofs(page, to, 0); 624 624 if (!err) 625 625 SetPageUptodate(page); 626 626 unlock_page(page); ··· 657 657 return 0; 658 658 659 659 /* XXX: inefficient but safe in the face of short writes */ 660 - err = affs_do_readpage_ofs(page, PAGE_SIZE); 660 + err = affs_do_readpage_ofs(page, PAGE_SIZE, 1); 661 661 if (err) { 662 662 unlock_page(page); 663 663 put_page(page); ··· 679 679 int written; 680 680 681 681 from = pos & (PAGE_SIZE - 1); 682 - to = pos + len; 682 + to = from + len; 683 683 /* 684 684 * XXX: not sure if this can handle short copies (len < copied), but 685 685 * we don't have to, because the page should always be uptodate here,
+1
fs/affs/inode.c
··· 140 140 inode->i_fop = &affs_file_operations; 141 141 break; 142 142 case ST_SOFTLINK: 143 + inode->i_size = strlen((char *)AFFS_HEAD(bh)->table); 143 144 inode->i_mode |= S_IFLNK; 144 145 inode_nohighmem(inode); 145 146 inode->i_op = &affs_symlink_inode_operations;
+73 -14
fs/affs/namei.c
··· 365 365 symname++; 366 366 } 367 367 *p = 0; 368 + inode->i_size = i + 1; 368 369 mark_buffer_dirty_inode(bh, inode); 369 370 affs_brelse(bh); 370 371 mark_inode_dirty(inode); ··· 394 393 return affs_add_entry(dir, inode, dentry, ST_LINKFILE); 395 394 } 396 395 397 - int 396 + static int 398 397 affs_rename(struct inode *old_dir, struct dentry *old_dentry, 399 - struct inode *new_dir, struct dentry *new_dentry, 400 - unsigned int flags) 398 + struct inode *new_dir, struct dentry *new_dentry) 401 399 { 402 400 struct super_block *sb = old_dir->i_sb; 403 401 struct buffer_head *bh = NULL; 404 402 int retval; 405 - 406 - if (flags & ~RENAME_NOREPLACE) 407 - return -EINVAL; 408 - 409 - pr_debug("%s(old=%lu,\"%pd\" to new=%lu,\"%pd\")\n", __func__, 410 - old_dir->i_ino, old_dentry, new_dir->i_ino, new_dentry); 411 403 412 404 retval = affs_check_name(new_dentry->d_name.name, 413 405 new_dentry->d_name.len, ··· 441 447 return retval; 442 448 } 443 449 450 + static int 451 + affs_xrename(struct inode *old_dir, struct dentry *old_dentry, 452 + struct inode *new_dir, struct dentry *new_dentry) 453 + { 454 + 455 + struct super_block *sb = old_dir->i_sb; 456 + struct buffer_head *bh_old = NULL; 457 + struct buffer_head *bh_new = NULL; 458 + int retval; 459 + 460 + bh_old = affs_bread(sb, d_inode(old_dentry)->i_ino); 461 + if (!bh_old) 462 + return -EIO; 463 + 464 + bh_new = affs_bread(sb, d_inode(new_dentry)->i_ino); 465 + if (!bh_new) 466 + return -EIO; 467 + 468 + /* Remove old header from its parent directory. */ 469 + affs_lock_dir(old_dir); 470 + retval = affs_remove_hash(old_dir, bh_old); 471 + affs_unlock_dir(old_dir); 472 + if (retval) 473 + goto done; 474 + 475 + /* Remove new header from its parent directory. */ 476 + affs_lock_dir(new_dir); 477 + retval = affs_remove_hash(new_dir, bh_new); 478 + affs_unlock_dir(new_dir); 479 + if (retval) 480 + goto done; 481 + 482 + /* Insert old into the new directory with the new name. */ 483 + affs_copy_name(AFFS_TAIL(sb, bh_old)->name, new_dentry); 484 + affs_fix_checksum(sb, bh_old); 485 + affs_lock_dir(new_dir); 486 + retval = affs_insert_hash(new_dir, bh_old); 487 + affs_unlock_dir(new_dir); 488 + 489 + /* Insert new into the old directory with the old name. */ 490 + affs_copy_name(AFFS_TAIL(sb, bh_new)->name, old_dentry); 491 + affs_fix_checksum(sb, bh_new); 492 + affs_lock_dir(old_dir); 493 + retval = affs_insert_hash(old_dir, bh_new); 494 + affs_unlock_dir(old_dir); 495 + done: 496 + mark_buffer_dirty_inode(bh_old, new_dir); 497 + mark_buffer_dirty_inode(bh_new, old_dir); 498 + affs_brelse(bh_old); 499 + affs_brelse(bh_new); 500 + return retval; 501 + } 502 + 503 + int affs_rename2(struct inode *old_dir, struct dentry *old_dentry, 504 + struct inode *new_dir, struct dentry *new_dentry, 505 + unsigned int flags) 506 + { 507 + 508 + if (flags & ~(RENAME_NOREPLACE | RENAME_EXCHANGE)) 509 + return -EINVAL; 510 + 511 + pr_debug("%s(old=%lu,\"%pd\" to new=%lu,\"%pd\")\n", __func__, 512 + old_dir->i_ino, old_dentry, new_dir->i_ino, new_dentry); 513 + 514 + if (flags & RENAME_EXCHANGE) 515 + return affs_xrename(old_dir, old_dentry, new_dir, new_dentry); 516 + 517 + return affs_rename(old_dir, old_dentry, new_dir, new_dentry); 518 + } 519 + 444 520 static struct dentry *affs_get_parent(struct dentry *child) 445 521 { 446 522 struct inode *parent; ··· 540 476 inode = affs_iget(sb, ino); 541 477 if (IS_ERR(inode)) 542 478 return ERR_CAST(inode); 543 - 544 - if (generation && inode->i_generation != generation) { 545 - iput(inode); 546 - return ERR_PTR(-ESTALE); 547 - } 548 479 549 480 return inode; 550 481 }
+1 -1
fs/binfmt_misc.c
··· 818 818 static int bm_fill_super(struct super_block *sb, void *data, int silent) 819 819 { 820 820 int err; 821 - static struct tree_descr bm_files[] = { 821 + static const struct tree_descr bm_files[] = { 822 822 [2] = {"status", &bm_status_operations, S_IWUSR|S_IRUGO}, 823 823 [3] = {"register", &bm_register_operations, S_IWUSR}, 824 824 /* last one */ {""}
+5 -14
fs/buffer.c
··· 49 49 50 50 static int fsync_buffers_list(spinlock_t *lock, struct list_head *list); 51 51 static int submit_bh_wbc(int op, int op_flags, struct buffer_head *bh, 52 - unsigned long bio_flags, 53 52 struct writeback_control *wbc); 54 53 55 54 #define BH_ENTRY(list) list_entry((list), struct buffer_head, b_assoc_buffers) ··· 1829 1830 do { 1830 1831 struct buffer_head *next = bh->b_this_page; 1831 1832 if (buffer_async_write(bh)) { 1832 - submit_bh_wbc(REQ_OP_WRITE, write_flags, bh, 0, wbc); 1833 + submit_bh_wbc(REQ_OP_WRITE, write_flags, bh, wbc); 1833 1834 nr_underway++; 1834 1835 } 1835 1836 bh = next; ··· 1883 1884 struct buffer_head *next = bh->b_this_page; 1884 1885 if (buffer_async_write(bh)) { 1885 1886 clear_buffer_dirty(bh); 1886 - submit_bh_wbc(REQ_OP_WRITE, write_flags, bh, 0, wbc); 1887 + submit_bh_wbc(REQ_OP_WRITE, write_flags, bh, wbc); 1887 1888 nr_underway++; 1888 1889 } 1889 1890 bh = next; ··· 3091 3092 } 3092 3093 3093 3094 static int submit_bh_wbc(int op, int op_flags, struct buffer_head *bh, 3094 - unsigned long bio_flags, struct writeback_control *wbc) 3095 + struct writeback_control *wbc) 3095 3096 { 3096 3097 struct bio *bio; 3097 3098 ··· 3126 3127 3127 3128 bio->bi_end_io = end_bio_bh_io_sync; 3128 3129 bio->bi_private = bh; 3129 - bio->bi_flags |= bio_flags; 3130 3130 3131 3131 /* Take care of bh's that straddle the end of the device */ 3132 3132 guard_bio_eod(op, bio); ··· 3140 3142 return 0; 3141 3143 } 3142 3144 3143 - int _submit_bh(int op, int op_flags, struct buffer_head *bh, 3144 - unsigned long bio_flags) 3145 + int submit_bh(int op, int op_flags, struct buffer_head *bh) 3145 3146 { 3146 - return submit_bh_wbc(op, op_flags, bh, bio_flags, NULL); 3147 - } 3148 - EXPORT_SYMBOL_GPL(_submit_bh); 3149 - 3150 - int submit_bh(int op, int op_flags, struct buffer_head *bh) 3151 - { 3152 - return submit_bh_wbc(op, op_flags, bh, 0, NULL); 3147 + return submit_bh_wbc(op, op_flags, bh, NULL); 3153 3148 } 3154 3149 EXPORT_SYMBOL(submit_bh); 3155 3150
+1 -1
fs/compat_ioctl.c
··· 833 833 */ 834 834 #define XFORM(i) (((i) ^ ((i) << 27) ^ ((i) << 17)) & 0xffffffff) 835 835 836 - #define COMPATIBLE_IOCTL(cmd) XFORM(cmd), 836 + #define COMPATIBLE_IOCTL(cmd) XFORM((u32)cmd), 837 837 /* ioctl should not be warned about even if it's not implemented. 838 838 Valid reasons to use this: 839 839 - It is implemented with ->compat_ioctl on some device, but programs
+2 -2
fs/dcache.c
··· 419 419 { 420 420 if (unlikely(!(dentry->d_flags & DCACHE_LRU_LIST))) 421 421 d_lru_add(dentry); 422 + else if (unlikely(!(dentry->d_flags & DCACHE_REFERENCED))) 423 + dentry->d_flags |= DCACHE_REFERENCED; 422 424 } 423 425 424 426 /** ··· 781 779 goto kill_it; 782 780 } 783 781 784 - if (!(dentry->d_flags & DCACHE_REFERENCED)) 785 - dentry->d_flags |= DCACHE_REFERENCED; 786 782 dentry_lru_add(dentry); 787 783 788 784 dentry->d_lockref.count--;
+1 -1
fs/debugfs/inode.c
··· 199 199 200 200 static int debug_fill_super(struct super_block *sb, void *data, int silent) 201 201 { 202 - static struct tree_descr debug_files[] = {{""}}; 202 + static const struct tree_descr debug_files[] = {{""}}; 203 203 struct debugfs_fs_info *fsi; 204 204 int err; 205 205
+4 -10
fs/fcntl.c
··· 899 899 * Exceptions: O_NONBLOCK is a two bit define on parisc; O_NDELAY 900 900 * is defined as O_NONBLOCK on some platforms and not on others. 901 901 */ 902 - BUILD_BUG_ON(21 - 1 /* for O_RDONLY being 0 */ != HWEIGHT32( 903 - O_RDONLY | O_WRONLY | O_RDWR | 904 - O_CREAT | O_EXCL | O_NOCTTY | 905 - O_TRUNC | O_APPEND | /* O_NONBLOCK | */ 906 - __O_SYNC | O_DSYNC | FASYNC | 907 - O_DIRECT | O_LARGEFILE | O_DIRECTORY | 908 - O_NOFOLLOW | O_NOATIME | O_CLOEXEC | 909 - __FMODE_EXEC | O_PATH | __O_TMPFILE | 910 - __FMODE_NONOTIFY 911 - )); 902 + BUILD_BUG_ON(21 - 1 /* for O_RDONLY being 0 */ != 903 + HWEIGHT32( 904 + (VALID_OPEN_FLAGS & ~(O_NONBLOCK | O_NDELAY)) | 905 + __FMODE_EXEC | __FMODE_NONOTIFY)); 912 906 913 907 fasync_cache = kmem_cache_create("fasync_cache", 914 908 sizeof(struct fasync_struct), 0, SLAB_PANIC, NULL);
+1 -1
fs/fuse/control.c
··· 292 292 293 293 static int fuse_ctl_fill_super(struct super_block *sb, void *data, int silent) 294 294 { 295 - struct tree_descr empty_descr = {""}; 295 + static const struct tree_descr empty_descr = {""}; 296 296 struct fuse_conn *fc; 297 297 int err; 298 298
+2 -1
fs/inode.c
··· 402 402 { 403 403 if (list_lru_add(&inode->i_sb->s_inode_lru, &inode->i_lru)) 404 404 this_cpu_inc(nr_unused); 405 + else 406 + inode->i_state |= I_REFERENCED; 405 407 } 406 408 407 409 /* ··· 1491 1489 drop = generic_drop_inode(inode); 1492 1490 1493 1491 if (!drop && (sb->s_flags & MS_ACTIVE)) { 1494 - inode->i_state |= I_REFERENCED; 1495 1492 inode_add_lru(inode); 1496 1493 spin_unlock(&inode->i_lock); 1497 1494 return;
-2
fs/internal.h
··· 126 126 return __atime_needs_update(path, inode, true); 127 127 } 128 128 129 - extern bool atime_needs_update_rcu(const struct path *, struct inode *); 130 - 131 129 /* 132 130 * fs-writeback.c 133 131 */
+1 -1
fs/libfs.c
··· 507 507 * to pass it an appropriate max_reserved value to avoid collisions. 508 508 */ 509 509 int simple_fill_super(struct super_block *s, unsigned long magic, 510 - struct tree_descr *files) 510 + const struct tree_descr *files) 511 511 { 512 512 struct inode *inode; 513 513 struct dentry *root;
+1 -1
fs/nfsd/nfsctl.c
··· 1146 1146 1147 1147 static int nfsd_fill_super(struct super_block * sb, void * data, int silent) 1148 1148 { 1149 - static struct tree_descr nfsd_files[] = { 1149 + static const struct tree_descr nfsd_files[] = { 1150 1150 [NFSD_List] = {"exports", &exports_nfsd_operations, S_IRUGO}, 1151 1151 [NFSD_Export_features] = {"export_features", 1152 1152 &export_features_operations, S_IRUGO},
+6
fs/open.c
··· 900 900 int lookup_flags = 0; 901 901 int acc_mode = ACC_MODE(flags); 902 902 903 + /* 904 + * Clear out all open flags we don't know about so that we don't report 905 + * them in fcntl(F_GETFD) or similar interfaces. 906 + */ 907 + flags &= VALID_OPEN_FLAGS; 908 + 903 909 if (flags & (O_CREAT | __O_TMPFILE)) 904 910 op->mode = (mode & S_IALLUGO) | S_IFREG; 905 911 else
+1 -1
fs/tracefs/inode.c
··· 266 266 267 267 static int trace_fill_super(struct super_block *sb, void *data, int silent) 268 268 { 269 - static struct tree_descr trace_files[] = {{""}}; 269 + static const struct tree_descr trace_files[] = {{""}}; 270 270 struct tracefs_fs_info *fsi; 271 271 int err; 272 272
include/linux/amigaffs.h fs/affs/amigaffs.h
-2
include/linux/buffer_head.h
··· 196 196 int sync_dirty_buffer(struct buffer_head *bh); 197 197 int __sync_dirty_buffer(struct buffer_head *bh, int op_flags); 198 198 void write_dirty_buffer(struct buffer_head *bh, int op_flags); 199 - int _submit_bh(int op, int op_flags, struct buffer_head *bh, 200 - unsigned long bio_flags); 201 199 int submit_bh(int, int, struct buffer_head *); 202 200 void write_boundary_block(struct block_device *bdev, 203 201 sector_t bblock, unsigned blocksize);
+6
include/linux/fcntl.h
··· 3 3 4 4 #include <uapi/linux/fcntl.h> 5 5 6 + /* list of all valid flags for the open/openat flags argument: */ 7 + #define VALID_OPEN_FLAGS \ 8 + (O_RDONLY | O_WRONLY | O_RDWR | O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC | \ 9 + O_APPEND | O_NDELAY | O_NONBLOCK | O_NDELAY | __O_SYNC | O_DSYNC | \ 10 + FASYNC | O_DIRECT | O_LARGEFILE | O_DIRECTORY | O_NOFOLLOW | \ 11 + O_NOATIME | O_CLOEXEC | O_PATH | __O_TMPFILE) 6 12 7 13 #ifndef force_o_largefile 8 14 #define force_o_largefile() (BITS_PER_LONG != 32)
+8 -6
include/linux/fs.h
··· 29 29 #include <linux/lockdep.h> 30 30 #include <linux/percpu-rwsem.h> 31 31 #include <linux/workqueue.h> 32 - #include <linux/percpu-rwsem.h> 33 32 #include <linux/delayed_call.h> 34 33 35 34 #include <asm/byteorder.h> ··· 2924 2925 2925 2926 static inline int vfs_stat(const char __user *filename, struct kstat *stat) 2926 2927 { 2927 - return vfs_statx(AT_FDCWD, filename, 0, stat, STATX_BASIC_STATS); 2928 + return vfs_statx(AT_FDCWD, filename, AT_NO_AUTOMOUNT, 2929 + stat, STATX_BASIC_STATS); 2928 2930 } 2929 2931 static inline int vfs_lstat(const char __user *name, struct kstat *stat) 2930 2932 { 2931 - return vfs_statx(AT_FDCWD, name, AT_SYMLINK_NOFOLLOW, 2933 + return vfs_statx(AT_FDCWD, name, AT_SYMLINK_NOFOLLOW | AT_NO_AUTOMOUNT, 2932 2934 stat, STATX_BASIC_STATS); 2933 2935 } 2934 2936 static inline int vfs_fstatat(int dfd, const char __user *filename, 2935 2937 struct kstat *stat, int flags) 2936 2938 { 2937 - return vfs_statx(dfd, filename, flags, stat, STATX_BASIC_STATS); 2939 + return vfs_statx(dfd, filename, flags | AT_NO_AUTOMOUNT, 2940 + stat, STATX_BASIC_STATS); 2938 2941 } 2939 2942 static inline int vfs_fstat(int fd, struct kstat *stat) 2940 2943 { ··· 3001 3000 extern const struct inode_operations simple_dir_inode_operations; 3002 3001 extern void make_empty_dir_inode(struct inode *inode); 3003 3002 extern bool is_empty_dir_inode(struct inode *inode); 3004 - struct tree_descr { char *name; const struct file_operations *ops; int mode; }; 3003 + struct tree_descr { const char *name; const struct file_operations *ops; int mode; }; 3005 3004 struct dentry *d_alloc_name(struct dentry *, const char *); 3006 - extern int simple_fill_super(struct super_block *, unsigned long, struct tree_descr *); 3005 + extern int simple_fill_super(struct super_block *, unsigned long, 3006 + const struct tree_descr *); 3007 3007 extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count); 3008 3008 extern void simple_release_fs(struct vfsmount **mount, int *count); 3009 3009
+1 -1
kernel/bpf/inode.c
··· 429 429 430 430 static int bpf_fill_super(struct super_block *sb, void *data, int silent) 431 431 { 432 - static struct tree_descr bpf_rfiles[] = { { "" } }; 432 + static const struct tree_descr bpf_rfiles[] = { { "" } }; 433 433 struct bpf_mount_opts opts; 434 434 struct inode *inode; 435 435 int ret;
+1 -1
security/inode.c
··· 28 28 29 29 static int fill_super(struct super_block *sb, void *data, int silent) 30 30 { 31 - static struct tree_descr files[] = {{""}}; 31 + static const struct tree_descr files[] = {{""}}; 32 32 33 33 return simple_fill_super(sb, SECURITYFS_MAGIC, files); 34 34 }
+2 -2
security/selinux/selinuxfs.c
··· 1496 1496 static int sel_make_avc_files(struct dentry *dir) 1497 1497 { 1498 1498 int i; 1499 - static struct tree_descr files[] = { 1499 + static const struct tree_descr files[] = { 1500 1500 { "cache_threshold", 1501 1501 &sel_avc_cache_threshold_ops, S_IRUGO|S_IWUSR }, 1502 1502 { "hash_stats", &sel_avc_hash_stats_ops, S_IRUGO }, ··· 1805 1805 struct inode *inode; 1806 1806 struct inode_security_struct *isec; 1807 1807 1808 - static struct tree_descr selinux_files[] = { 1808 + static const struct tree_descr selinux_files[] = { 1809 1809 [SEL_LOAD] = {"load", &sel_load_ops, S_IRUSR|S_IWUSR}, 1810 1810 [SEL_ENFORCE] = {"enforce", &sel_enforce_ops, S_IRUGO|S_IWUSR}, 1811 1811 [SEL_CONTEXT] = {"context", &transaction_ops, S_IRUGO|S_IWUGO},
+1 -1
security/smack/smackfs.c
··· 2855 2855 int rc; 2856 2856 struct inode *root_inode; 2857 2857 2858 - static struct tree_descr smack_files[] = { 2858 + static const struct tree_descr smack_files[] = { 2859 2859 [SMK_LOAD] = { 2860 2860 "load", &smk_load_ops, S_IRUGO|S_IWUSR}, 2861 2861 [SMK_CIPSO] = {