From: Theodore Ts'o <tytso@mit.edu>
To: torvalds@linux-foundation.org, linux-kernel@vger.kernel.org,
linux-ext4@vger.kernel.org
Subject: Re: [GIT PULL] ext4 changes for 4.2-rc1
Date: Thu, 25 Jun 2015 00:54:30 -0400 [thread overview]
Message-ID: <20150625045430.GG14324@thunk.org> (raw)
In-Reply-To: <20150625034626.GA21682@thunk.org>
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);
next prev parent reply other threads:[~2015-06-25 4:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-25 3:46 [GIT PULL] ext4 changes for 4.2-rc1 Theodore Ts'o
2015-06-25 4:54 ` Theodore Ts'o [this message]
2015-06-26 2:19 ` Theodore Ts'o
2015-06-25 15:37 ` Holger Hoffstätte
2015-06-27 3:05 ` Linus Torvalds
2015-06-27 4:02 ` Theodore Ts'o
2015-06-27 14:07 ` Theodore Ts'o
2015-06-29 8:27 ` Jan Kara
2015-06-29 9:04 ` Jan Kara
2015-06-29 20:49 ` Theodore Ts'o
2015-06-29 12:31 ` Ming Lei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150625045430.GG14324@thunk.org \
--to=tytso@mit.edu \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.