Skip to contentSkip to conversation

reiser4: port for Linux-4.2

PATCH In review Edward Shishkin 2 participants 2 messages Sep 22, 2015 – Sep 25, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 reiser4: port for Linux-4.2

fs/reiser4/flush_queue.c +0 -3
diff -u -r linux-4.1.7/fs/reiser4/flush_queue.c linux-4.2/fs/reiser4/flush_queue.c
@@ -402,9 +402,6 @@
 
 	assert("zam-958", bio->bi_rw & WRITE);
 
-	if (err == -EOPNOTSUPP)
-		set_bit(BIO_EOPNOTSUPP, &bio->bi_flags);
-
 	/* we expect that bio->private is set to NULL or fq object which is used
 	 * for synchronization and error counting. */
 	fq = bio->bi_private;
fs/reiser4/page_cache.c +4 -0
diff -u -r linux-4.1.7/fs/reiser4/page_cache.c linux-4.2/fs/reiser4/page_cache.c
@@ -218,6 +218,7 @@
 {
 	assert("nikita-2168", fake->i_state & I_NEW);
 	fake->i_mapping->a_ops = &formatted_fake_as_ops;
+	inode_attach_wb(fake, NULL);
 	*pfake = fake;
 	/* NOTE-NIKITA something else? */
 	unlock_new_inode(fake);
@@ -281,16 +282,19 @@
 	sinfo = get_super_private_nocheck(super);
 
 	if (sinfo->fake != NULL) {
+		inode_detach_wb(sinfo->fake);
 		iput(sinfo->fake);
 		sinfo->fake = NULL;
 	}
 
 	if (sinfo->bitmap != NULL) {
+		inode_detach_wb(sinfo->bitmap);
 		iput(sinfo->bitmap);
 		sinfo->bitmap = NULL;
 	}
 
 	if (sinfo->cc != NULL) {
+		inode_detach_wb(sinfo->cc);
 		iput(sinfo->cc);
 		sinfo->cc = NULL;
 	}
fs/reiser4/page_cache.h +0 -6
diff -u -r linux-4.1.7/fs/reiser4/page_cache.h linux-4.2/fs/reiser4/page_cache.h
@@ -43,12 +43,6 @@
 			 PAGE_KERNEL);
 }
 
-static inline void reiser4_cancel_dirty_page(struct page *page)
-{
-	if (TestClearPageDirty(page))
-		account_page_cleaned(page, page->mapping);
-}
-
 #define PAGECACHE_TAG_REISER4_MOVED PAGECACHE_TAG_DIRTY
 
 #if REISER4_DEBUG
fs/reiser4/plugin/file/cryptcompress.c +4 -2
diff -u -r linux-4.1.7/fs/reiser4/plugin/file/cryptcompress.c linux-4.2/fs/reiser4/plugin/file/cryptcompress.c
@@ -1946,7 +1946,9 @@
 		 * page is no longer relevant. However, the uptodate
 		 * status of the page is still relevant!
 		 */
-		reiser4_cancel_dirty_page(clust->pages[i]);
+		if (PageDirty(clust->pages[i]))
+			cancel_dirty_page(clust->pages[i]);
+
 		unlock_page(clust->pages[i]);
 
 		if (in_page < PAGE_CACHE_SIZE)
@@ -2908,7 +2910,7 @@
 	info = cryptcompress_inode_data(inode);
 	ctx = get_current_context();
 
-	result = file_remove_suid(file);
+	result = file_remove_privs(file);
 	if (unlikely(result != 0)) {
 		context_set_commit_async(ctx);
 		return result;
fs/reiser4/plugin/file/file.c +1 -1
diff -u -r linux-4.1.7/fs/reiser4/plugin/file/file.c linux-4.2/fs/reiser4/plugin/file/file.c
@@ -2101,7 +2101,7 @@
 	assert("vs-947", !reiser4_inode_get_flag(inode, REISER4_NO_SD));
 	assert("vs-9471", (!reiser4_inode_get_flag(inode, REISER4_PART_MIXED)));
 
-	result = file_remove_suid(file);
+	result = file_remove_privs(file);
 	if (result) {
 		context_set_commit_async(ctx);
 		return result;
fs/reiser4/plugin/inode_ops.c +2 -3
diff -u -r linux-4.1.7/fs/reiser4/plugin/inode_ops.c linux-4.2/fs/reiser4/plugin/inode_ops.c
@@ -402,7 +402,7 @@
  * inode_operations.
  * Assumes that inode's i_private points to the content of symbolic link.
  */
-void *reiser4_follow_link_common(struct dentry *dentry, struct nameidata *nd)
+const char *reiser4_follow_link_common(struct dentry *dentry, void **cookie)
 {
 	assert("vs-851", S_ISLNK(dentry->d_inode->i_mode));
 
@@ -410,8 +410,7 @@
 	    || !reiser4_inode_get_flag(dentry->d_inode,
 				       REISER4_GENERIC_PTR_USED))
 		return ERR_PTR(RETERR(-EINVAL));
-	nd_set_link(nd, dentry->d_inode->i_private);
-	return NULL;
+	return *cookie = dentry->d_inode->i_private;
 }
 
 /**
fs/reiser4/plugin/object.h +1 -1
diff -u -r linux-4.1.7/fs/reiser4/plugin/object.h linux-4.2/fs/reiser4/plugin/object.h
@@ -24,7 +24,7 @@
 		 umode_t mode, dev_t rdev);
 int reiser4_rename_common(struct inode *old_dir, struct dentry *old_name,
 			  struct inode *new_dir, struct dentry *new_name);
-void *reiser4_follow_link_common(struct dentry *, struct nameidata *data);
+const char *reiser4_follow_link_common(struct dentry *, void **cookie);
 int reiser4_permission_common(struct inode *, int mask);
 int reiser4_setattr_common(struct dentry *, struct iattr *);
 int reiser4_getattr_common(struct vfsmount *mnt, struct dentry *,
fs/reiser4/wander.c +0 -5
diff -u -r linux-4.1.7/fs/reiser4/wander.c linux-4.2/fs/reiser4/wander.c
@@ -841,15 +841,10 @@
 			if (super->s_flags & MS_RDONLY)
 				undo_bio(bio);
 			else {
-				int not_supported;
-
 				add_fq_to_bio(fq, bio);
 				bio_get(bio);
 				reiser4_submit_bio(write_op, bio);
-				not_supported = bio_flagged(bio, BIO_EOPNOTSUPP);
 				bio_put(bio);
-				if (not_supported)
-					return -EOPNOTSUPP;
 			}
 
 			block += nr_used - 1;