Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1171849 > unrolled thread

Re: [GIT PULL] ext4 changes for 4.2-rc1

Started byTheodore Ts'o <tytso@mit.edu>
First post2015-06-25 07:00 +0200
Last post2015-06-26 04:20 +0200
Articles 2 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [GIT PULL] ext4 changes for 4.2-rc1 Theodore Ts'o <tytso@mit.edu> - 2015-06-25 07:00 +0200
    Re: [GIT PULL] ext4 changes for 4.2-rc1 Theodore Ts'o <tytso@mit.edu> - 2015-06-26 04:20 +0200

#1171849 — Re: [GIT PULL] ext4 changes for 4.2-rc1

FromTheodore Ts'o <tytso@mit.edu>
Date2015-06-25 07:00 +0200
SubjectRe: [GIT PULL] ext4 changes for 4.2-rc1
Message-ID<pF7qy-6P1-7@gated-at.bofh.it>
Hi Linus,

Here's my suggested merge resolution to deal with Al Viro's symlink changes.

       	  	    	  	     	     - Ted

diff --cc fs/ext4/symlink.c
index ba5bd18,68e915a..0000000
--- a/fs/ext4/symlink.c
+++ b/fs/ext4/symlink.c
@@@ -35,19 -34,20 +34,17 @@@ static const char *ext4_follow_link(str
  	int res;
  	u32 plen, max_size = inode->i_sb->s_blocksize;
  
- 	ctx = ext4_get_fname_crypto_ctx(inode, inode->i_sb->s_blocksize);
- 	if (IS_ERR(ctx))
- 		return ERR_CAST(ctx);
 -	if (!ext4_encrypted_inode(inode))
 -		return page_follow_link_light(dentry, nd);
 -
+ 	res = ext4_get_encryption_info(inode);
+ 	if (res)
+ 		return ERR_PTR(res);
  
  	if (ext4_inode_is_fast_symlink(inode)) {
  		caddr = (char *) EXT4_I(inode)->i_data;
  		max_size = sizeof(EXT4_I(inode)->i_data);
  	} else {
  		cpage = read_mapping_page(inode->i_mapping, 0, NULL);
- 		if (IS_ERR(cpage)) {
- 			ext4_put_fname_crypto_ctx(&ctx);
+ 		if (IS_ERR(cpage))
 -			return cpage;
 +			return ERR_CAST(cpage);
- 		}
  		caddr = kmap(cpage);
  		caddr[size] = 0;
  	}
@@@ -77,14 -78,13 +75,12 @@@
  	/* Null-terminate the name */
  	if (res <= plen)
  		paddr[res] = '\0';
- 	ext4_put_fname_crypto_ctx(&ctx);
 -	nd_set_link(nd, paddr);
  	if (cpage) {
  		kunmap(cpage);
  		page_cache_release(cpage);
  	}
 -	return NULL;
 +	return *cookie = paddr;
  errout:
- 	ext4_put_fname_crypto_ctx(&ctx);
  	if (cpage) {
  		kunmap(cpage);
  		page_cache_release(cpage);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1172557

FromTheodore Ts'o <tytso@mit.edu>
Date2015-06-26 04:20 +0200
Message-ID<pFrpg-1YQ-11@gated-at.bofh.it>
In reply to#1171849
    [ I renamed "ext4_follow_link()" to "ext4_encrypted_follow_link()" in
      the merge resolution, to make it clear that that function is _only_
      used for encrypted symlinks.  The function doesn't actually work for
      non-encrypted symlinks at all, and they use the generic helpers
		                                                   - Linus ]

Thanks, that was on my todo list as a cleanup patch after the merge window closed...

:-)

	     	       	    	      	      - Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web