Linux 3.3 compat, iops->create()/mkdir()/mknod()

The mode argument of iops->create()/mkdir()/mknod() was changed from
an 'int' to a 'umode_t'.  To prevent a compiler warning an autoconf
check was added to detect the API change and then correctly set a
zpl_umode_t typedef.  There is no functional change.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #701
This commit is contained in:
Brian Behlendorf
2012-04-30 12:01:49 -07:00
parent ce90208cf9
commit b39d3b9f7b
62 changed files with 241 additions and 6 deletions
+1 -1
View File
@@ -300,7 +300,7 @@ zpl_snapdir_rmdir(struct inode *dip, struct dentry *dentry)
}
static int
zpl_snapdir_mkdir(struct inode *dip, struct dentry *dentry, int mode)
zpl_snapdir_mkdir(struct inode *dip, struct dentry *dentry, zpl_umode_t mode)
{
cred_t *cr = CRED();
vattr_t *vap;
+5 -4
View File
@@ -54,7 +54,7 @@ zpl_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd)
void
zpl_vap_init(vattr_t *vap, struct inode *dir, struct dentry *dentry,
mode_t mode, cred_t *cr)
zpl_umode_t mode, cred_t *cr)
{
vap->va_mask = ATTR_MODE;
vap->va_mode = mode;
@@ -71,7 +71,7 @@ zpl_vap_init(vattr_t *vap, struct inode *dir, struct dentry *dentry,
}
static int
zpl_create(struct inode *dir, struct dentry *dentry, int mode,
zpl_create(struct inode *dir, struct dentry *dentry, zpl_umode_t mode,
struct nameidata *nd)
{
cred_t *cr = CRED();
@@ -93,7 +93,8 @@ zpl_create(struct inode *dir, struct dentry *dentry, int mode,
}
static int
zpl_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t rdev)
zpl_mknod(struct inode *dir, struct dentry *dentry, zpl_umode_t mode,
dev_t rdev)
{
cred_t *cr = CRED();
struct inode *ip;
@@ -136,7 +137,7 @@ zpl_unlink(struct inode *dir, struct dentry *dentry)
}
static int
zpl_mkdir(struct inode *dir, struct dentry *dentry, int mode)
zpl_mkdir(struct inode *dir, struct dentry *dentry, zpl_umode_t mode)
{
cred_t *cr = CRED();
vattr_t *vap;