diff options
| author | Theodore Ts'o <tytso@mit.edu> | 2015-01-22 14:49:04 -0500 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-05-27 19:39:53 +0200 |
| commit | 2be563347909998b5c506df9b77ef4478ce1aad9 (patch) | |
| tree | 6c0d75466cc41b4b0729d4f37537b32462fbd28d | |
| parent | 70d9ee8808b252acefe0113e256f998028e308c8 (diff) | |
| download | android_kernel_m2note-2be563347909998b5c506df9b77ef4478ce1aad9.tar.gz | |
ext4: remove tmpfile, rename2, set_acl operations for 3.18 backport
Also switch to the rename operation.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| -rw-r--r-- | fs/ext4/namei.c | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 426211882..844b6fe16 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -2281,6 +2281,7 @@ retry: return err; } +#if 0 static int ext4_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode) { handle_t *handle; @@ -2318,6 +2319,7 @@ err_unlock_inode: unlock_new_inode(inode); return err; } +#endif struct ext4_dir_entry_2 *ext4_init_dot_dotdot(struct inode *inode, struct ext4_dir_entry_2 *de, @@ -3145,6 +3147,7 @@ static void ext4_rename_delete(handle_t *handle, struct ext4_renament *ent, } } +#if 0 static void ext4_update_dir_count(handle_t *handle, struct ext4_renament *ent) { if (ent->dir_nlink_delta) { @@ -3188,6 +3191,7 @@ retry: } return wh; } +#endif /* * Anybody can rename anything with this: the permission checks are left to the @@ -3257,15 +3261,19 @@ static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry, credits = (2 * EXT4_DATA_TRANS_BLOCKS(old.dir->i_sb) + EXT4_INDEX_EXTRA_TRANS_BLOCKS + 2); +#if 0 if (!(flags & RENAME_WHITEOUT)) { +#endif handle = ext4_journal_start(old.dir, EXT4_HT_DIR, credits); if (IS_ERR(handle)) return PTR_ERR(handle); +#if 0 } else { whiteout = ext4_whiteout_for_rename(&old, credits, &handle); if (IS_ERR(whiteout)) return PTR_ERR(whiteout); } +#endif if (IS_DIRSYNC(old.dir) || IS_DIRSYNC(new.dir)) ext4_handle_sync(handle); @@ -3379,6 +3387,7 @@ end_rename: return retval; } +#if 0 static int ext4_cross_rename(struct inode *old_dir, struct dentry *old_dentry, struct inode *new_dir, struct dentry *new_dentry) { @@ -3501,20 +3510,12 @@ end_rename: ext4_journal_stop(handle); return retval; } +#endif static int ext4_rename2(struct inode *old_dir, struct dentry *old_dentry, - struct inode *new_dir, struct dentry *new_dentry, - unsigned int flags) + struct inode *new_dir, struct dentry *new_dentry) { - if (flags & ~(RENAME_NOREPLACE | RENAME_EXCHANGE | RENAME_WHITEOUT)) - return -EINVAL; - - if (flags & RENAME_EXCHANGE) { - return ext4_cross_rename(old_dir, old_dentry, - new_dir, new_dentry); - } - - return ext4_rename(old_dir, old_dentry, new_dir, new_dentry, flags); + return ext4_rename(old_dir, old_dentry, new_dir, new_dentry, 0); } /* @@ -3529,15 +3530,19 @@ const struct inode_operations ext4_dir_inode_operations = { .mkdir = ext4_mkdir, .rmdir = ext4_rmdir, .mknod = ext4_mknod, +#if 0 .tmpfile = ext4_tmpfile, - .rename2 = ext4_rename2, +#endif + .rename = ext4_rename2, .setattr = ext4_setattr, .setxattr = generic_setxattr, .getxattr = generic_getxattr, .listxattr = ext4_listxattr, .removexattr = generic_removexattr, .get_acl = ext4_get_acl, +#if 0 .set_acl = ext4_set_acl, +#endif .fiemap = ext4_fiemap, }; @@ -3548,5 +3553,7 @@ const struct inode_operations ext4_special_inode_operations = { .listxattr = ext4_listxattr, .removexattr = generic_removexattr, .get_acl = ext4_get_acl, +#if 0 .set_acl = ext4_set_acl, +#endif }; |
