#define ATTR_EXTEND 0x000F
#define ATTR_RWMASK 0x007E
-/* file creation modes */
-#define FM_REGULAR 0x00
-
#define NUM_UPCASE 2918
#ifdef __LITTLE_ENDIAN
s32 create_dir(struct inode *inode, struct chain_t *p_dir,
struct uni_name_t *p_uniname, struct file_id_t *fid);
s32 create_file(struct inode *inode, struct chain_t *p_dir,
- struct uni_name_t *p_uniname, u8 mode, struct file_id_t *fid);
+ struct uni_name_t *p_uniname, struct file_id_t *fid);
void remove_file(struct inode *inode, struct chain_t *p_dir, s32 entry);
s32 exfat_rename_file(struct inode *inode, struct chain_t *p_dir, s32 old_entry,
struct uni_name_t *p_uniname, struct file_id_t *fid);
}
s32 create_file(struct inode *inode, struct chain_t *p_dir,
- struct uni_name_t *p_uniname, u8 mode, struct file_id_t *fid)
+ struct uni_name_t *p_uniname, struct file_id_t *fid)
{
s32 ret, dentry, num_entries;
struct super_block *sb = inode->i_sb;
/* fill the directory entry information of the created file.
* the first cluster is not determined yet. (0)
*/
- ret = exfat_init_dir_entry(sb, p_dir, dentry, TYPE_FILE | mode,
+ ret = exfat_init_dir_entry(sb, p_dir, dentry, TYPE_FILE,
CLUSTER_32(0), 0);
if (ret != 0)
return ret;
fid->dir.flags = p_dir->flags;
fid->entry = dentry;
- fid->attr = ATTR_ARCHIVE | mode;
+ fid->attr = ATTR_ARCHIVE;
fid->flags = 0x03;
fid->size = 0;
fid->start_clu = CLUSTER_32(~0);
return ret;
}
-static int ffsCreateFile(struct inode *inode, char *path, u8 mode,
- struct file_id_t *fid)
+static int ffsCreateFile(struct inode *inode, char *path, struct file_id_t *fid)
{
struct chain_t dir;
struct uni_name_t uni_name;
fs_set_vol_flags(sb, VOL_DIRTY);
/* create a new file */
- ret = create_file(inode, &dir, &uni_name, mode, fid);
+ ret = create_file(inode, &dir, &uni_name, fid);
#ifndef CONFIG_STAGING_EXFAT_DELAYED_SYNC
fs_sync(sb, true);
pr_debug("%s entered\n", __func__);
- err = ffsCreateFile(dir, (u8 *)dentry->d_name.name, FM_REGULAR, &fid);
+ err = ffsCreateFile(dir, (u8 *)dentry->d_name.name, &fid);
if (err)
goto out;