You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: fs/cifs/dir.c
This commit is contained in:
+13
-3
@@ -283,10 +283,13 @@ cifs_statfs(struct dentry *dentry, struct kstatfs *buf)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cifs_permission(struct inode *inode, int mask)
|
||||
static int cifs_permission(struct inode *inode, int mask, unsigned int flags)
|
||||
{
|
||||
struct cifs_sb_info *cifs_sb;
|
||||
|
||||
if (flags & IPERM_FLAG_RCU)
|
||||
return -ECHILD;
|
||||
|
||||
cifs_sb = CIFS_SB(inode->i_sb);
|
||||
|
||||
if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_PERM) {
|
||||
@@ -298,7 +301,7 @@ static int cifs_permission(struct inode *inode, int mask)
|
||||
on the client (above and beyond ACL on servers) for
|
||||
servers which do not support setting and viewing mode bits,
|
||||
so allowing client to check permissions is useful */
|
||||
return generic_permission(inode, mask, NULL);
|
||||
return generic_permission(inode, mask, flags, NULL);
|
||||
}
|
||||
|
||||
static struct kmem_cache *cifs_inode_cachep;
|
||||
@@ -334,10 +337,17 @@ cifs_alloc_inode(struct super_block *sb)
|
||||
return &cifs_inode->vfs_inode;
|
||||
}
|
||||
|
||||
static void cifs_i_callback(struct rcu_head *head)
|
||||
{
|
||||
struct inode *inode = container_of(head, struct inode, i_rcu);
|
||||
INIT_LIST_HEAD(&inode->i_dentry);
|
||||
kmem_cache_free(cifs_inode_cachep, CIFS_I(inode));
|
||||
}
|
||||
|
||||
static void
|
||||
cifs_destroy_inode(struct inode *inode)
|
||||
{
|
||||
kmem_cache_free(cifs_inode_cachep, CIFS_I(inode));
|
||||
call_rcu(&inode->i_rcu, cifs_i_callback);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
+25
-12
@@ -135,9 +135,9 @@ static void setup_cifs_dentry(struct cifsTconInfo *tcon,
|
||||
struct inode *newinode)
|
||||
{
|
||||
if (tcon->nocase)
|
||||
direntry->d_op = &cifs_ci_dentry_ops;
|
||||
d_set_d_op(direntry, &cifs_ci_dentry_ops);
|
||||
else
|
||||
direntry->d_op = &cifs_dentry_ops;
|
||||
d_set_d_op(direntry, &cifs_dentry_ops);
|
||||
d_instantiate(direntry, newinode);
|
||||
}
|
||||
|
||||
@@ -421,9 +421,9 @@ int cifs_mknod(struct inode *inode, struct dentry *direntry, int mode,
|
||||
rc = cifs_get_inode_info_unix(&newinode, full_path,
|
||||
inode->i_sb, xid);
|
||||
if (pTcon->nocase)
|
||||
direntry->d_op = &cifs_ci_dentry_ops;
|
||||
d_set_d_op(direntry, &cifs_ci_dentry_ops);
|
||||
else
|
||||
direntry->d_op = &cifs_dentry_ops;
|
||||
d_set_d_op(direntry, &cifs_dentry_ops);
|
||||
|
||||
if (rc == 0)
|
||||
d_instantiate(direntry, newinode);
|
||||
@@ -604,9 +604,9 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
|
||||
|
||||
if ((rc == 0) && (newInode != NULL)) {
|
||||
if (pTcon->nocase)
|
||||
direntry->d_op = &cifs_ci_dentry_ops;
|
||||
d_set_d_op(direntry, &cifs_ci_dentry_ops);
|
||||
else
|
||||
direntry->d_op = &cifs_dentry_ops;
|
||||
d_set_d_op(direntry, &cifs_dentry_ops);
|
||||
d_add(direntry, newInode);
|
||||
if (posix_open) {
|
||||
filp = lookup_instantiate_filp(nd, direntry,
|
||||
@@ -634,9 +634,9 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
|
||||
rc = 0;
|
||||
direntry->d_time = jiffies;
|
||||
if (pTcon->nocase)
|
||||
direntry->d_op = &cifs_ci_dentry_ops;
|
||||
d_set_d_op(direntry, &cifs_ci_dentry_ops);
|
||||
else
|
||||
direntry->d_op = &cifs_dentry_ops;
|
||||
d_set_d_op(direntry, &cifs_dentry_ops);
|
||||
d_add(direntry, NULL);
|
||||
/* if it was once a directory (but how can we tell?) we could do
|
||||
shrink_dcache_parent(direntry); */
|
||||
@@ -656,6 +656,9 @@ lookup_out:
|
||||
static int
|
||||
cifs_d_revalidate(struct dentry *direntry, struct nameidata *nd)
|
||||
{
|
||||
if (nd->flags & LOOKUP_RCU)
|
||||
return -ECHILD;
|
||||
|
||||
if (direntry->d_inode) {
|
||||
if (cifs_revalidate_dentry(direntry))
|
||||
return 0;
|
||||
@@ -700,9 +703,10 @@ const struct dentry_operations cifs_dentry_ops = {
|
||||
/* d_delete: cifs_d_delete, */ /* not needed except for debugging */
|
||||
};
|
||||
|
||||
static int cifs_ci_hash(struct dentry *dentry, struct qstr *q)
|
||||
static int cifs_ci_hash(const struct dentry *dentry, const struct inode *inode,
|
||||
struct qstr *q)
|
||||
{
|
||||
struct nls_table *codepage = CIFS_SB(dentry->d_inode->i_sb)->local_nls;
|
||||
struct nls_table *codepage = CIFS_SB(dentry->d_sb)->local_nls;
|
||||
unsigned long hash;
|
||||
int i;
|
||||
|
||||
@@ -715,13 +719,22 @@ static int cifs_ci_hash(struct dentry *dentry, struct qstr *q)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cifs_ci_compare(struct dentry *dentry, struct qstr *a,
|
||||
struct qstr *b)
|
||||
static int cifs_ci_compare(const struct dentry *parent,
|
||||
const struct inode *pinode,
|
||||
const struct dentry *dentry, const struct inode *inode,
|
||||
unsigned int len, const char *str, const struct qstr *name)
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
struct nls_table *codepage = CIFS_SB(dentry->d_inode->i_sb)->local_nls;
|
||||
|
||||
if ((a->len == b->len) &&
|
||||
(nls_strnicmp(codepage, a->name, b->name, a->len) == 0))
|
||||
=======
|
||||
struct nls_table *codepage = CIFS_SB(pinode->i_sb)->local_nls;
|
||||
|
||||
if ((name->len == len) &&
|
||||
(nls_strnicmp(codepage, name->name, str, len) == 0))
|
||||
>>>>>>> 0c21e3aaf6ae85bee804a325aa29c325209180fd
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
+7
-7
@@ -809,14 +809,14 @@ inode_has_hashed_dentries(struct inode *inode)
|
||||
{
|
||||
struct dentry *dentry;
|
||||
|
||||
spin_lock(&dcache_lock);
|
||||
spin_lock(&inode->i_lock);
|
||||
list_for_each_entry(dentry, &inode->i_dentry, d_alias) {
|
||||
if (!d_unhashed(dentry) || IS_ROOT(dentry)) {
|
||||
spin_unlock(&dcache_lock);
|
||||
spin_unlock(&inode->i_lock);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
spin_unlock(&dcache_lock);
|
||||
spin_unlock(&inode->i_lock);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1319,9 +1319,9 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode)
|
||||
to set uid/gid */
|
||||
inc_nlink(inode);
|
||||
if (pTcon->nocase)
|
||||
direntry->d_op = &cifs_ci_dentry_ops;
|
||||
d_set_d_op(direntry, &cifs_ci_dentry_ops);
|
||||
else
|
||||
direntry->d_op = &cifs_dentry_ops;
|
||||
d_set_d_op(direntry, &cifs_dentry_ops);
|
||||
|
||||
cifs_unix_basic_to_fattr(&fattr, pInfo, cifs_sb);
|
||||
cifs_fill_uniqueid(inode->i_sb, &fattr);
|
||||
@@ -1363,9 +1363,9 @@ mkdir_get_info:
|
||||
inode->i_sb, xid, NULL);
|
||||
|
||||
if (pTcon->nocase)
|
||||
direntry->d_op = &cifs_ci_dentry_ops;
|
||||
d_set_d_op(direntry, &cifs_ci_dentry_ops);
|
||||
else
|
||||
direntry->d_op = &cifs_dentry_ops;
|
||||
d_set_d_op(direntry, &cifs_dentry_ops);
|
||||
d_instantiate(direntry, newinode);
|
||||
/* setting nlink not necessary except in cases where we
|
||||
* failed to get it from the server or was set bogus */
|
||||
|
||||
+2
-2
@@ -525,9 +525,9 @@ cifs_symlink(struct inode *inode, struct dentry *direntry, const char *symname)
|
||||
rc);
|
||||
} else {
|
||||
if (pTcon->nocase)
|
||||
direntry->d_op = &cifs_ci_dentry_ops;
|
||||
d_set_d_op(direntry, &cifs_ci_dentry_ops);
|
||||
else
|
||||
direntry->d_op = &cifs_dentry_ops;
|
||||
d_set_d_op(direntry, &cifs_dentry_ops);
|
||||
d_instantiate(direntry, newinode);
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -79,7 +79,7 @@ cifs_readdir_lookup(struct dentry *parent, struct qstr *name,
|
||||
cFYI(1, "For %s", name->name);
|
||||
|
||||
if (parent->d_op && parent->d_op->d_hash)
|
||||
parent->d_op->d_hash(parent, name);
|
||||
parent->d_op->d_hash(parent, parent->d_inode, name);
|
||||
else
|
||||
name->hash = full_name_hash(name->name, name->len);
|
||||
|
||||
@@ -103,9 +103,9 @@ cifs_readdir_lookup(struct dentry *parent, struct qstr *name,
|
||||
}
|
||||
|
||||
if (cifs_sb_master_tcon(CIFS_SB(sb))->nocase)
|
||||
dentry->d_op = &cifs_ci_dentry_ops;
|
||||
d_set_d_op(dentry, &cifs_ci_dentry_ops);
|
||||
else
|
||||
dentry->d_op = &cifs_dentry_ops;
|
||||
d_set_d_op(dentry, &cifs_dentry_ops);
|
||||
|
||||
alias = d_materialise_unique(dentry, inode);
|
||||
if (alias != NULL) {
|
||||
|
||||
Reference in New Issue
Block a user