Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -Nrupad linux-2.6.37_plus_v16_clean//drivers/staging/zcache/zcache.c linux-2.6.37_plus_v16_fix//drivers/staging/zcache/zcache.c
- --- linux-2.6.37_plus_v16_clean//drivers/staging/zcache/zcache.c 2011-02-20 02:43:47.398811587 +0100
- +++ linux-2.6.37_plus_v16_fix//drivers/staging/zcache/zcache.c 2011-02-20 02:16:11.780812923 +0100
- @@ -1591,9 +1591,9 @@ __setup("nofrontswap", no_frontswap);
- static int __init zcache_init(void)
- {
- +#ifdef CONFIG_SYSFS
- int ret = 0;
- -#ifdef CONFIG_SYSFS
- ret = sysfs_create_group(mm_kobj, &zcache_attr_group);
- if (ret) {
- pr_err("zcache: can't create sysfs\n");
- diff -Nrupad linux-2.6.37_plus_v16_clean//fs/super.c linux-2.6.37_plus_v16_fix//fs/super.c
- --- linux-2.6.37_plus_v16_clean//fs/super.c 2011-02-20 02:43:47.544811587 +0100
- +++ linux-2.6.37_plus_v16_fix//fs/super.c 2011-02-20 02:16:55.200812888 +0100
- @@ -177,8 +177,8 @@ void deactivate_locked_super(struct supe
- {
- struct file_system_type *fs = s->s_type;
- if (atomic_dec_and_test(&s->s_active)) {
- - fs->kill_sb(s);
- cleancache_flush_fs(s);
- + fs->kill_sb(s);
- put_filesystem(fs);
- put_super(s);
- } else {
- diff -Nrupad linux-2.6.37_plus_v16_clean//mm/cleancache.c linux-2.6.37_plus_v16_fix//mm/cleancache.c
- --- linux-2.6.37_plus_v16_clean//mm/cleancache.c 2011-02-20 02:43:47.595811587 +0100
- +++ linux-2.6.37_plus_v16_fix//mm/cleancache.c 2011-02-20 02:17:24.430812865 +0100
- @@ -73,25 +73,27 @@ EXPORT_SYMBOL(__cleancache_init_shared_f
- * the key, else use the inode number.
- */
- static int cleancache_get_key(struct inode *inode,
- - struct cleancache_filekey *key)
- + struct cleancache_filekey *key)
- {
- - int (*fhfn)(struct dentry *, __u32 *fh, int *, int);
- - int maxlen = CLEANCACHE_KEY_MAX;
- - struct super_block *sb = inode->i_sb;
- - struct dentry *d;
- + int (*fhfn)(struct dentry *, __u32 *fh, int *, int);
- + int len = 0, maxlen = CLEANCACHE_KEY_MAX;
- + struct super_block *sb = inode->i_sb;
- + struct dentry *d;
- - key->u.ino = inode->i_ino;
- - if (sb->s_export_op != NULL) {
- - fhfn = sb->s_export_op->encode_fh;
- - if (fhfn) {
- - d = list_first_entry(&inode->i_dentry,
- - struct dentry, d_alias);
- - (void)(*fhfn)(d, &key->u.fh[0], &maxlen, 0);
- - if (maxlen > CLEANCACHE_KEY_MAX)
- - return -1;
- - }
- - }
- - return 0;
- + key->u.ino = inode->i_ino;
- + if (sb->s_export_op != NULL) {
- + fhfn = sb->s_export_op->encode_fh;
- + if (fhfn) {
- + d = list_first_entry(&inode->i_dentry,
- + struct dentry, d_alias);
- + len = (*fhfn)(d, &key->u.fh[0], &maxlen, 0);
- + if (len <= 0 || len == 255)
- + return -1;
- + if (maxlen > CLEANCACHE_KEY_MAX)
- + return -1;
- + }
- + }
- + return 0;
- }
- /*
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement