示例#1
0
static int
myfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{
    int retval = myfs_mknod(dir, dentry, mode | S_IFDIR, 0);
    if(!retval)
        inc_nlink(dir);

    return retval;
}
示例#2
0
static int myfs_create(struct inode *dir, struct dentry *dentry, int mode)
{
        int res;

        mode = (mode & S_IALLUGO) | S_IFREG;
        res = myfs_mknod(dir, dentry, mode, 0);
        if (!res)
                fsnotify_create(dir, dentry);
        return res;
}
示例#3
0
static int
myfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, bool excl)
{
    return myfs_mknod(dir, dentry, mode | S_IFREG, 0);
}